note 37074 rejected from function.function-exists by betz
| From: | betz@php.net | Date: | Sat, 01 Nov 2003 20:21:40 +0000 |
| Subject: | note 37074 rejected from function.function-exists by betz | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-59642@lists.php.net to get a copy of this message | ||
Note Submitter: prgoulet@sympatico.ca
----
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?