On Tue, 2004-05-11 at 14:36, Jason Garber wrote: > Consider this below: [...] > class UserClass{ > public static function forName($name, $c = NULL) { > if(is_null($c)) > //... > elseif($c instanceof ClassLoader) > //... > else > //Throw an error > } > } > > Using this method, you can easily solve the issue pointed out above, while > allowing the type hint to be strict.
Jason, I know how to build a workaround; but this is just kludgy. Marcus complained in his original mail that he was "annoyed" by the fact of having to check on a type-hinted parameter being NULL. How about I suggest I'm annoyed about having to check non-type-hinted parameters in the way you suggested above? - Timm -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php