|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2015-05-03 19:58 UTC] rasmus@php.net
-Assigned To:
+Assigned To: derick
[2018-08-15 16:33 UTC] cmb@php.net
-Status: Assigned
+Status: Closed
-Assigned To: derick
+Assigned To: cmb
[2018-08-15 16:33 UTC] cmb@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 15:00:01 2025 UTC |
Description: ------------ There is currently no way to portably write this: class myTime extends DateTime { public static function createFromFormat($format, $time, DateTimeZone $tz = null) { } } such that it doesn't generate a warning in PHP 5 and or PHP 7. Without "DateTimeZone $tz" it gives: Warning: Declaration of myTime::createFromFormat() should be compatible with DateTime::createFromFormat($format, $time, DateTimeZone $object = NULL) in /home/rasmus/cc on line 0 in PHP 7 and with it we get: Strict Standards: Declaration of myTime::createFromFormat() should be compatible with DateTime::createFromFormat($format, $time, $object = NULL) in /home/rasmus/cc on line 4 in PHP 5.6. We need a sensible upgrade path here which is probably to just simply drop the DateTimeZone restriction from the prototype.