Doc #51317 [Opn->Asn]: Errors/Exceptions section is incorrect

From: Date: Thu, 18 Mar 2010 06:06:39 +0000
Subject: Doc #51317 [Opn->Asn]: Errors/Exceptions section is incorrect
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-4058@lists.php.net to get a copy of this message
Edit report at http://bugs.php.net/bug.php?id=51317&edit=1 ID: 51317 Updated by: joey@php.net Reported by: laurenty at gmail dot com Summary: Errors/Exceptions section is incorrect -Status: Open +Status: Assigned Type: Documentation Problem Package: Documentation problem PHP Version: 5.2.13 -Assigned To: +Assigned To: joey New Comment: Appears to be a missing ChangeLog table on DateTime::__construct. Previous Comments: ------------------------------------------------------------------------ [2010-03-18 07:03:52] laurenty at gmail dot com 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" ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/bug.php?id=51317&edit=1

« previous php.doc.bugs (#4058) next »