FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » static vs global variable
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: static vs global variable [message #172710 is a reply to message #172709] Sun, 27 February 2011 02:38 Go to previous messageGo to previous message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma:
Senior Member
On 2/26/2011 8:42 PM, Leonardo Azpurua wrote:
>
> "The Natural Philosopher" <tnp(at)invalid(dot)invalid> escribió en el mensaje
> news:ikb2fq$o8f$1(at)news(dot)albasani(dot)net...
>>
>> That's maybe possible if you are writing OO code, but it is often
>> simpler when having functions that modify several different variables,
>> to have then as globals, in order not to either pass pointers to the
>> functions, or try and work out a way to return more than one variable
>> from a function.
>
> Hi,
>
> Perhaps I have become thick with the years, but I can't imagine why a
> function should be required to modify several different global variables.
>
> If you don't want to enter into all the details and subtleties of OOP,
> fine. But using and object to pack all the data required by a given
> process, and pass it to any function that might need it is even easier
> than having to remember the names of every global variable involved in a
> complex procedure.
>
> I am completely new to PHP, but it is universal programming common
> sense, like using structs in C, or Records in Pascal.
>
> --
>

Leonardo, as you will learn if you stick around here long enough, TNP is
not a programmer (nor the electrical engineer he claims to be). He is
merely a hacker who thinks he knows everything - but knows very little
about good programming practices. He makes all kinds of claims as to
what he's done in the past, but his comments in this newsgroup have
repeatedly shown the opposite.

It's why he uses a pseudonym instead of his real name - he doesn't want
anyone to find out who he really is.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Stats comp.lang.php (last 7 days)
Next Topic: ODBC Connection
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sat Nov 23 23:59:45 GMT 2024

Total time taken to generate the page: 0.04154 seconds