Which of the two is more efficient:
# start of file.php
$myvar = 3;
# end file.php
#start of file.php
function myvar() {
return 3;
}
#end file.php
the difference between the two is the first example would set the variable
on every page regardless of whether it was used whereas with the function
obviously it would be used only if it were called.
what's better? (myvar is a constant #)
- Noah
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]