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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2/9/06, Jochem Maas <jochem@xxxxxxxxxxxxx> 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() is a
lot safer and more elegant to use than variables, why do many projects
use variables?

Would you guys know why this is so? AFAIK, in compiled languages like
C, constants are faster because the preprocessor expands them at
compile-time rather than being allocated memory during run-time - but
then we're talking about PHP here.

--
Stand before it and there is no beginning.
Follow it and there is no end.
Stay with the ancient Tao,
Move with the present.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux