#19318 [Bgs]: get_defined_functions() not returning all available functions
ID: 19318
Updated by: hholzgra@php.net
Reported By: marcuscorrea@yahoo.com
Status: Bogus
Bug Type: PHP options/info functions
Operating System: Win ME + Apache (local)
PHP Version: 4.2.2
New Comment:
as a sidenote:
the comment on functions_exists() is about functions
like ImageGIF() that might be available when an extension
loaded (GD Image extension in this case) but can't do
anything useful because a precondition for this function
is not met
in this case ImageGif() will just return false and emmit a warning (at
least it did once, it might be not available at all now in this case)
if a function is not available at all (due to a missing extension or
due to an extension selectively registering functions) then both
get_defined_functions() and function_exists() will not know about it
...
so both reflection functions tell you about *callable*
functions, not functional ones and especialy not about
those theoreticly available *if* you had some extension loaded which
you haven't
Previous Comments:
------------------------------------------------------------------------
[2002-09-09 10:50:35] sniper@php.net
You need to enable the extensions for the functions to exist. Not a
bug.
------------------------------------------------------------------------
[2002-09-09 10:50:15] marcuscorrea@yahoo.com
No, I have not.
If installing said libraries influences the output, it would be good if
this was informed in the documentation.
In the documentation of a related function, namely function_exists(),
it says:
"Note that a function name may exist even if the function itself is
unusable due to configuration or compiling options (...)".
I just assumed this to be true for get_defined_functions() as well.
Sorry.
Marcus
------------------------------------------------------------------------
[2002-09-09 10:44:22] kalowsky@php.net
Did you install said libraries?
------------------------------------------------------------------------
[2002-09-09 10:42:31] marcuscorrea@yahoo.com
get_defined_functions() does not return all internal functions
available in release 4.2.2.
I used
$arr = get_defined_functions();
print_r($arr);
and got the list allright. However, if I search for any 'domxml_' or
'exif_' strings in my output, for instance, I do not find any.
Regards,
Marcus
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=19318&edit=1
Thread (6 messages)