Edit report at https://bugs.php.net/bug.php?id=55407&edit=1
ID: 55407 Comment by: landeholm at gmail dot com Reported by: landeholm at gmail dot com Summary: Impossible to prototype DateTime::createFromFormat Status: Open Type: Bug Package: Scripting Engine problem Operating System: Irrelevant PHP Version: 5.3.6 Block user comment: N Private report: N New Comment: Here is the related commit (adding the class above): https://github.com/melt/melt/commit/4c08b7e65ad9a3dbf165768b0fa55a99862cf910 Here is my temporary workaround: https://github.com/melt/melt/commit/25c295fd86a52f84f18777814d7efaa8cf372fd6 Previous Comments: ------------------------------------------------------------------------ [2011-08-11 20:10:00] landeholm at gmail dot com Description: ------------ Hello, I'm creating an extended DateTime for my framework. The test script below gives "E_STRICT: Declaration of melt\core\DateTime::createFromFormat() should be compatible with that of DateTime::createFromFormat()" even though it's declared exactly as documented. Also removing all the arguments what so ever doesn't make this problem go away so it's impossible to prototype DateTime::createFromFormat without getting this error. Test script: --------------- <?php namespace melt\core; class DateTime extends \DateTime { public static function createFromFormat($format, $time, DateTimeZone $timezone = null) { return new DateTime(parent::createFromFormat($format, $time, $timezone)); } } Expected result: ---------------- The class being declared as it should. Actual result: -------------- E_STRICT: Declaration of melt\core\DateTime::createFromFormat() should be compatible with that of DateTime::createFromFormat() ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=55407&edit=1