note 37074 added to function.function-exists
| From: | prgoulet at sympatico dot ca | Date: | Sat, 01 Nov 2003 19:45:33 +0000 |
| Subject: | note 37074 added to function.function-exists | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-59641@lists.php.net to get a copy of this message | ||
I can't explain why it is so (maybe someone will enlight us) but try this:
I the same php file, I have:
// ---
if (!function_exists('SiteOffline')){function SiteOffline(){
echo 'stuff'; exit;
}}
function SiteOffline(){
echo 'stuff'; exit;
}
// ---
no error will be generated. It's as if the second 'function SiteOffLine...' is not
seen by PHP.
Now add another 'function SiteOffLine...', and you get an error.
Can someone shed sone light on this wierd behavior?
----
Manual Page -- http://www.php.net/manual/en/function.function-exists.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+37074
Delete -- http://master.php.net/manage/user-notes.php?action=delete+37074&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+37074&report=yes
Search -- http://master.php.net/manage/user-notes.php