|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2010-03-18 07:06 UTC] joey@php.net
-Status: Open
+Status: Assigned
-Assigned To:
+Assigned To: joey
[2010-03-18 07:06 UTC] joey@php.net
[2010-10-20 07:08 UTC] kalle@php.net
[2010-10-20 07:09 UTC] kalle@php.net
-Assigned To: joey
+Assigned To: kalle
[2010-10-20 07:09 UTC] kalle@php.net
-Status: Assigned
+Status: Closed
[2010-10-20 07:09 UTC] kalle@php.net
[2020-02-07 06:09 UTC] phpdocbot@php.net
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 17:00:01 2025 UTC |
Description: ------------ The section states that "Emits Exception in case of an error." but fails to mention that this behavior only applies to PHP 5 >= 5.3.0. If 5.2, DateTime::__construct triggers an error, not an exception. Test script: --------------- <?php set_error_handler('dummy'); try { $date = new DateTime('not a date'); } catch (Exception $e) { die("\ncaught exception"); } die("\ndying"); function dummy() { echo "\ndummy function"; } ?> Expected result: ---------------- "caught exception" Actual result: -------------- "dummy"