Ok, I'm only wondering this because I'm tryin to decrease the load time
significantly because each page has to go through a lot of stuff before
they're loaded and with the volume of hits it gets, i need anything to help
out
- Noah
"CC Zona" <[EMAIL PROTECTED]> wrote in message
9dsm85$kgl$[EMAIL PROTECTED]">news:9dsm85$kgl$[EMAIL PROTECTED]...
> In article <9dsknt$fb1$[EMAIL PROTECTED]>,
> [EMAIL PROTECTED] ("Noah Spitzer-Williams") wrote:
>
> > So my question is should i just do:
> >
> > define("myvar", 3);
> >
> > OR:
> >
> > $myvar = 3;
> >
> > does defining it make that much of a difference (if i have several of
these
> > variables that could be defined instead).
>
> I'm not sure whether there's a significant difference in memory usage, but
> IMO the difference in scoping rules is a significant consideration.
> Constants carry over into functions local scope, while variables must be
> explicitely passed or declared as global in order to become available in a
> function's local scope. Which one you consider to be the "convenience" and
> which you consider the "nuisance" is in the eye of the beholder <g>, but
> IMO either way it's a very handy/exploitable distinction which you can use
> to speed up development/debugging time.
>
> --
> CC
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]