#19318 [Bgs->Csd]: get_defined_functions() not returning all available functions

From: Date: Tue, 10 Sep 2002 13:01:11 +0000
Subject: #19318 [Bgs->Csd]: get_defined_functions() not returning all available functions
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-18924@lists.php.net to get a copy of this message
ID: 19318 User updated by: marcuscorrea@yahoo.com Reported By: marcuscorrea@yahoo.com -Status: Bogus +Status: Closed Bug Type: PHP options/info functions Operating System: Win ME + Apache (local) PHP Version: 4.2.2 New Comment: Thank you! I guess it is a matter of making the documentation clearer. Previous Comments: ------------------------------------------------------------------------ [2002-09-10 04:10:59] hholzgra@php.net 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 ------------------------------------------------------------------------ [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

« previous php.bugs (#18924) next »