From: lgandras at gmail dot com Operating system: CentoOS 6.2 x64 PHP version: 5.3.16 Package: *Configuration Issues Bug Type: Bug Bug description:set_exception_handler doesn't work from command line
Description: ------------ This is the output of my console: # /usr/local/bin/php -v PHP 5.3.16 (cli) (built: Aug 30 2012 18:38:54) Copyright (c) 1997-2012 The PHP Group Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies # /usr/local/bin/php -r 'set_exception_handler(function(){echo "catched\n";});throw new Exception;' Fatal error: Uncaught exception 'Exception' in Command line code on line 1 Exception: in Command line code on line 1 Call Stack: 0.0002 632056 1. {main}() Command line code:0 root@vps:~# Test script: --------------- # /usr/local/bin/php -r 'set_exception_handler(function($e){echo "catched!\n";});throw new Exception;' Expected result: ---------------- catched! Actual result: -------------- Fatal error: Uncaught exception 'Exception' in Command line code on line 1 Exception: in Command line code on line 1 Call Stack: 0.0002 632056 1. {main}() Command line code:0 -- Edit bug report at https://bugs.php.net/bug.php?id=62985&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=62985&r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=62985&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=62985&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=62985&r=fixed Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=62985&r=needdocs Fixed in release: https://bugs.php.net/fix.php?id=62985&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=62985&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=62985&r=needscript Try newer version: https://bugs.php.net/fix.php?id=62985&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=62985&r=support Expected behavior: https://bugs.php.net/fix.php?id=62985&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=62985&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=62985&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=62985&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=62985&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=62985&r=dst IIS Stability: https://bugs.php.net/fix.php?id=62985&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=62985&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=62985&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=62985&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=62985&r=mysqlcfg