ID: 30230 User updated by: auroraeosrose at hotmail dot com Reported By: auroraeosrose at hotmail dot com Status: Open Bug Type: Zend Engine 2 problem Operating System: Win XP Pro SP2 PHP Version: 5CVS-2004-09-25 (dev) New Comment:
oops, expected and actual are flipped, sorry Previous Comments: ------------------------------------------------------------------------ [2004-09-25 17:02:15] auroraeosrose at hotmail dot com Description: ------------ this is the 5.0 cvs snapshots NOT the 5.1 cvs snapshots set_exception_handler(array($object, 'method')); or even set_exception_handler(array('Class', 'method')); does not work, setting just a function does set_exception_handler('function); Reproduce code: --------------- class dog { function bug($exception) { var_dump($exception); } } $dog = new dog(); set_exception_handler(array($dog, 'bug')); throw new Exception('doggy'); Expected result: ---------------- Fatal error: Uncaught exception 'Exception' with message 'doggy' in [removed]:10 Stack trace: #0 {main} thrown in [removed] on line 10 Actual result: -------------- object(Exception)#1 (6) { ["message:protected"]=> string(5) "doggy" ["string:private"]=> string(0) "" ["code:protected"]=> int(0) ["file:protected"]=> string(45) "[removed]" ["line:protected"]=> int(8) ["trace:private"]=> array(0) { } } ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=30230&edit=1