At 14:55 31.03.2003, Wez Furlong wrote:
You can use function_exists() to avoid a fatal error, but there is no
equivalent function_parameters_are_ok() API to avoid a miserable death
in the situations that I have already mentioned.

Why not just be consistent with all the other parameter checks and raise
an E_WARNING and RETURN_NULL when the parameters are incorrect?
I don't see what is so special about hinted parameters that they have to
bail out the engine, while the built-in (and extension) functions will
happily return NULL and continue execution.


We are NOT consistent. Some functions return NULL, some return false
and most functions do not even document what they do. And there are
functions that return NULL and false depending on the type of error.

marcus


-- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to