IllegalArgumentException for Type hintsScope of ChangeMethods declared with type hints will throw an IllegalArgumentException when type mismatches occur. Rationale
Fatal error prevention. Functionality
What happens currently
$ php5 -r 'class Test { static function x(Object $o) { }} Test::x();'
Fatal error: Argument 1 passed to Test::x() must be an object of class
Object, called in Command line code on line 1 and defined in Command
line code on line 1
How to fix itPrepending this: set_error_handler( ... to the above code will yield in an uncaught exception instead of
a fatal error. Security considerations
n/a Speed impact
n/a Dependencies
- This RFC will bump the version number to 5.3.0 Related documents
- http://xp-framework.net/rfc/contrib/rfc0100.diff
Patch for lang.base.php Comments
| Table of contents |