note 78803 added to function.date-create

From: Date: Sun, 28 Oct 2007 23:22:11 +0000
Subject: note 78803 added to function.date-create
Groups: php.notes 
Request: Send a blank email to php-notes+get-131797@lists.php.net to get a copy of this message
When using these functions inside of destructors or functions called as a result of being registered with register_shutdown_handler, be sure to use date_create() instead of new DateTime(). This is because new DateTime will throw an exception on failure, which is not permitted in any of the above circumstances. If new DateTime() does fail in one of these circumstances, you will get an error stating "Fatal error: Exception thrown without a stack frame in Unknown on line 0." ---- Server IP: 208.69.120.35 Probable Submitter: 67.167.203.96 ---- Manual Page -- http://www.php.net/manual/en/function.date-create.php Edit -- https://master.php.net/note/edit/78803 Del: integrated -- https://master.php.net/note/delete/78803/integrated Del: useless -- https://master.php.net/note/delete/78803/useless Del: bad code -- https://master.php.net/note/delete/78803/bad+code Del: spam -- https://master.php.net/note/delete/78803/spam Del: non-english -- https://master.php.net/note/delete/78803/non-english Del: in docs -- https://master.php.net/note/delete/78803/in+docs Del: other reasons-- https://master.php.net/note/delete/78803 Reject -- https://master.php.net/note/reject/78803 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#131797) next »