Doc #63906 [Com]: DateInterval::__construct throws undocumented Exception

From: Date: Mon, 14 Jan 2013 09:18:50 +0000
Subject: Doc #63906 [Com]: DateInterval::__construct throws undocumented Exception
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-9396@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=63906&edit=1 ID: 63906 Comment by: oaass@php.net Reported by: matt dot patterson at bookit dot com Summary: DateInterval::__construct throws undocumented Exception Status: Open Type: Documentation Problem Package: Documentation problem PHP Version: Irrelevant Block user comment: N Private report: N New Comment: You can find documentation for Exception on http://php.net/class.exception Previous Comments: ------------------------------------------------------------------------ [2013-01-04 19:16:59] matt dot patterson at bookit dot com Description: ------------ --- From manual page: http://www.php.net/dateinterval.construct#refsect1-dateinterval.construct-parameters --- DateInterval::__construct() throws \Exception when an invalid format is supplied, but this exception is not documented anywhere in the PHP manual. Test script: --------------- <?php try { $di = new DateInterval('PTS'); // Or any other invalid format } catch (Exception $e) { echo $e->getMessage(); } /* * Prints: * DateInterval::__construct() [<a href='dateinterval.--construct'>dateinterval.--construct</a>]: Unknown or bad format (PTS) */ ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=63906&edit=1

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