NYCPHP Meetup

NYPHP.org

[nycphp-talk] Framework Question - Site Configuration

Rich Gray rich at f1central.net
Wed Dec 10 17:59:09 EST 2003


>
> Personally, I prefer using constants defined in a config file. Since, by
> convention, constants are normally all in CAPS, then mispelling a
> constant name immediately throws up a parse error. In addition, it's a
> visual indicator to me that its value has been set "somewhere" in my
> app. It would seem that using an array, one could inadvertantly change
> the value whereas once a constant is defined, that's that...no mucking
> around with its value.
>
> Jeff Siegel

yep -- also CONSTANTS are globally scoped... so do not need any prior
declaration in functions...

Rich




More information about the talk mailing list