note 30768 modified in function.get-defined-functions by danbrown

From: Date: Sat, 19 Jul 2008 22:50:14 +0000
Subject: note 30768 modified in function.get-defined-functions by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-141776@lists.php.net to get a copy of this message
I've written simple XML-RPC server which automatically registers all defined functions starting with "RPC_" prefix and found, that with PHP 2.4.3 on Win32 and Linux platforms function names are in lowercase so the xmlrpc_server_call_method() is case sensitive which is correct with XML, but not with PHP and get_functions_defined() I also suggest changing the function to have flags/options to return internal, user or both functions only and starting with prefix such as: <?php // constants define( 'xxx_INTERNAL', 0x1 ); define( 'xxx_USER', 0x2 ); define( 'xxx_BOTH', 0x3 ); // declaration array get_functions_defined( int options, string prefix ); ?> with both arguments optional. Johnnie --was-- I've written simple XML-RPC server which automatically registers all defined functions starting with "RPC_" prefix and found, that with PHP 2.4.3 on Win32 and Linux platforms function names are in lowercase so the xmlrpc_server_call_method() is case sensitive which is correct with XML, but not with PHP and get_functions_defined() I also suggest changing the function to have flags/options to return internal, user or both functions only and starting with prefix such as: --- // constants define( 'xxx_INTERNAL', 0x1 ); define( 'xxx_USER', 0x2 ); define( 'xxx_BOTH', 0x3 ); // declaration array get_functions_defined( int options, string prefix ); --- with both arguments optional. Johnnie http://php.net/manual/en/function.get-defined-functions.php

« previous php.notes (#141776) next »