[nycphp-talk] constants vs globals
David Mintz
dmintz at davidmintz.org
Fri Feb 20 17:42:29 EST 2004
Then it's all settled: BEER! (This being Friday evening and all).
On Fri, 20 Feb 2004, Adam Maccabee Trachtenberg wrote:
> On Fri, 20 Feb 2004, Dan Cech wrote:
>
> > Personally I use constants for data which is just that, something which
> > is not going to be different depending on the time of day, direction of
> > the wind, etc. Anything else that I need either goes into the
> > appropriate class or $GLOBALS['config'].
>
> I am with Dan here. I rarely use constants, but when I do they're for
> stuff like PI. (Okay, that's built in, but you get the point.)
>
> Worrying about speed here is far less worrysome that accidentally
> defining the ratio of the circumference to the diameter of a circle. :)
>
> -adam
>
> --
> adam at trachtenberg.com
> author of o'reilly's php cookbook
> avoid the holiday rush, buy your copy today!
> _______________________________________________
> talk mailing list
> talk at lists.nyphp.org
> http://lists.nyphp.org/mailman/listinfo/talk
>
---
David Mintz
http://davidmintz.org/
"Anybody else got a problem with Webistics?" -- Sopranos 24:17
More information about the talk
mailing list