Page 1 of 1

Does DEFINE strain PHP

Posted: Wed Jan 21, 2004 1:05 pm
by Gen-ik
I'm using DEFINE quite a lot in a script I'm writting at the moment and was curious if this would put much of a strain on the script.

Example...

Code: Select all

<?php

define("FUNC", "system.core/cms/functions/");
define("USER_SET", "system.core/settings/user/");

?>
...although at the last count the script could be defining up to 17 different things, not just two :)

Re: Does DEFINE strain PHP

Posted: Wed Jan 21, 2004 1:25 pm
by Roja
Gen-ik wrote:I'm using DEFINE quite a lot in a script I'm writting at the moment and was curious if this would put much of a strain on the script.

Example...

Code: Select all

<?php

define("FUNC", "system.core/cms/functions/");
define("USER_SET", "system.core/settings/user/");

?>
...although at the last count the script could be defining up to 17 different things, not just two :)
I define over 80 unique defines in my app, throughout the app, and the processing time for EVERYTHING (including those defines) is < 0.40 seconds on a lightly loaded Celeron-1ghz.

So no, it definitely doesnt put much strain on the script.

Posted: Wed Jan 21, 2004 1:40 pm
by Gen-ik
That's all I needed to hear :)

Thanks mate.