Is there a way to check not only if a function exists, but also to
check that the number and types of parameters desired match a function
definition?
The reason being that additional options have been added in php 4 and
5 to various standard function calls, but I'm still running a php3 and
php4 server in addition to a php5 server. I would like to make sure
that certain "extended" function calls still work in all versions (or
I'll perform the tasks "manually", albeit less efficiently).
One example I can think of is the round() function. The $precision
parameter was added in php4, so will not work in php3. However,
function_exists would return TRUE for both 3 and 4, but round itself
would fail if I tried to send a precision level to the php3 server.
Thanks much,
Matt
P.S. Of course the modified "function_exists" would unfortunately have
to be a recognized function/method in php3 in order for me to call it
to check parameter counts on a php3 server :(
I am sure you have some good reasons for keeping php3 right?
Why don't you consider updating to at least php4 ??
PHPv3 is not even maintained and PHPv4 is not being developed any more.
So by the end of this year (I hope) we will start using a stable PHPv6.
IMHO you should consider changing your code (if this is possible) to a
more mainstream version.
--
Thodoris
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php