Does DEFINE strain PHP

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Gen-ik
DevNet Resident
Posts: 1059
Joined: Mon Aug 12, 2002 7:08 pm
Location: London. UK.

Does DEFINE strain PHP

Post 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 :)
Roja
Tutorials Group
Posts: 2692
Joined: Sun Jan 04, 2004 10:30 pm

Re: Does DEFINE strain PHP

Post 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.
Gen-ik
DevNet Resident
Posts: 1059
Joined: Mon Aug 12, 2002 7:08 pm
Location: London. UK.

Post by Gen-ik »

That's all I needed to hear :)

Thanks mate.
Post Reply