|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2010-02-20 21:28 UTC] derick@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Sun Feb 15 22:00:01 2026 UTC |
Description: ------------ new DateTime('123') throws an exception Reproduce code: --------------- new DateTime('123'); echo "X"; Expected result: ---------------- X Actual result: -------------- Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (123) at position 0 (1): Unexpected character' in /home/devel/x.php:5 Stack trace: #0 /home/devel/x.php(5): DateTime->__construct('123') #1 {main} thrown in /home/devel/x.php on line 5