Re: [PHP] define() or $variable for application settings?

2006-02-09 Thread Jochem Maas
Chris wrote: Hi Matt, I use define's. me too. mostly because unless you use the runkit extension or something you can't undefine or change the values of a constant. bare in mind though that define() is horribly slow (to paraphrase Rasmus) which may be the reason many projects choose to use

Re: [PHP] define() or $variable for application settings?

2006-02-09 Thread Matt Arnilo S. Baluyos (Mailing Lists)
On 2/9/06, Jochem Maas [EMAIL PROTECTED] wrote: bare in mind though that define() is horribly slow (to paraphrase Rasmus) which may be the reason many projects choose to use variables instead. see here: Thanks Chris and Jochem! That should've been my follow up question - which is, if define()

Re: [PHP] define() or $variable for application settings?

2006-02-09 Thread tedd
Matt: That should've been my follow up question - which is, if define() is a lot safer and more elegant to use than variables, why do many projects use variables? My use of CONSTANCE's and variables depend upon need. If I require a constant throughout the main() portion of my code, then I

Re: [PHP] define() or $variable for application settings?

2006-02-09 Thread Barry
tedd wrote: Matt: That should've been my follow up question - which is, if define() is a lot safer and more elegant to use than variables, why do many projects use variables? My use of CONSTANCE's and variables depend upon need. If I require a constant throughout the main() portion of my

Re: [PHP] define() or $variable for application settings?

2006-02-09 Thread Paul Novitski
At 07:56 PM 2/8/2006, Matt Arnilo S. Baluyos (Mailing Lists) wrote: I have a config.inc.php file which basically contains all the configuration info that the applications needs (directory/file locations, database credentials, etc). The information there is set using the define() function.

[PHP] define() or $variable for application settings?

2006-02-08 Thread Matt Arnilo S. Baluyos (Mailing Lists)
Hello Everyone, I have a config.inc.php file which basically contains all the configuration info that the applications needs (directory/file locations, database credentials, etc). The information there is set using the define() function. However, I've seen some open-source projects which either

Re: [PHP] define() or $variable for application settings?

2006-02-08 Thread Chris
Hi Matt, I use define's. With variables it's easy to forget to global'ise it when you go into a function, define's don't have this issue. Matt Arnilo S. Baluyos (Mailing Lists) wrote: Hello Everyone, I have a config.inc.php file which basically contains all the configuration info that the