Re: Re: Type hints revisited [IllegalArgumentException instead of E_ERROR]

From: Date: Mon, 31 Mar 2003 12:57:30 +0000
Subject: Re: Re: Type hints revisited [IllegalArgumentException instead of E_ERROR]
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-535@lists.php.net to get a copy of this message
On Mon, 31 Mar 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. Sounds logical to me too... Derick -- "my other box is your windows PC" ------------------------------------------------------------------------- Derick Rethans http://derickrethans.nl/ PHP Magazine - PHP Magazine for Professionals http://php-mag.net/ -------------------------------------------------------------------------

« previous php.internals (#535) next »