|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2020-09-04 10:38 UTC] nikic@php.net
-Status: Open
+Status: Wont fix
[2020-09-04 10:38 UTC] nikic@php.net
[2020-09-04 12:38 UTC] jochem dot blok at fasterforward dot nl
[2020-09-07 07:40 UTC] nikic@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Nov 02 22:00:01 2025 UTC |
Description: ------------ Error "Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)`" does not trigger own error handler. Callingerror_get_last() does return this error. Test script: --------------- function shutdown() { $error = error_get_last(); var_dump($error); } register_shutdown_function('shutdown'); function myErrorHandler($errno, $errstr, $errfile, $errline) { echo "\n\n--------------- ERROR ---------------------\n\n"; echo "\n".'errno = '; print_r($errno); echo "\n".'errstr = '; print_r($errstr); echo "\n".'errfile = '; print_r($errfile); echo "\n".'errline = '; print_r($errline); return true; } set_error_handler("myErrorHandler"); $a = 1; $b = 2; $c = 3; $d = 4; $e = 5; echo $a ? $b : $c ? $d : $e; parse_str ('wrweqr'); Expected result: ---------------- As you can see parse_str is handle by the own error handler. "echo $a ? $b : $c ? $d : $e;" should also be handled. Actual result: -------------- Only parse_str is handled.