|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2020-12-03 13:40 UTC] peehaa@php.net
[2020-12-03 13:43 UTC] cmb@php.net
-Status: Open
+Status: Feedback
-Assigned To:
+Assigned To: cmb
[2020-12-03 13:43 UTC] cmb@php.net
[2020-12-03 14:04 UTC] scott at scott-corcoran dot com
[2020-12-03 14:09 UTC] cmb@php.net
-Status: Feedback
+Status: Not a bug
[2020-12-03 14:09 UTC] cmb@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 13:00:01 2025 UTC |
Description: ------------ <?php try { throw new Exception('xxxx'); } catch(Exception $x) { echo serialize($x->getCode()); } ?> i:0; Documentation, class Exception: Methods o public Exception::__construct NULL ([string $message = ""], [int $code], [Exception $previous]) Test script: --------------- As in the description: try { throw new Exception('xxxx'); } catch(Exception $x) { if (serialize($x->getCode() == 's:0;') exit(0); throw new Exception('Invalid exception code default'); } Expected result: ---------------- silence