note 49183 deleted from function.function-exists by tularis
| From: | tularis@php.net | Date: | Wed, 19 Jan 2005 10:25:55 +0000 |
| Subject: | note 49183 deleted from function.function-exists by tularis | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-83614@lists.php.net to get a copy of this message | ||
Note Submitter: tommy at NOSPAM dot van-tomas dot de
----
Why this function doesn't return true while checking the function empty()?
e.g.
<?php
$sFunctionname = "empty";
if (function_exists("$sFunctionname")) {
echo "Function $sFunctionname() was found!";
} else {
echo "Function $sFunctionname() couldn't be found!";
}
?>
returns "Function empty() couldn't be found!"
I've discussed this with a co-worker and he mentioned, that function_exists() maybe watches in
a "function list" for functions, that were not part of the php distribution from the
beginning. But I've tested this with the mail() function, which is part of PHP since version 3,
and it returned true! Isn't the empty() function a function?