From: Operating system: Irrelevant PHP version: 5.3.6 Package: Scripting Engine problem Bug Type: Bug Bug description:Impossible to prototype DateTime::createFromFormat
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 bug report at https://bugs.php.net/bug.php?id=55407&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=55407&r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=55407&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=55407&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=55407&r=fixed Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=55407&r=needdocs Fixed in release: https://bugs.php.net/fix.php?id=55407&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=55407&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=55407&r=needscript Try newer version: https://bugs.php.net/fix.php?id=55407&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=55407&r=support Expected behavior: https://bugs.php.net/fix.php?id=55407&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=55407&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=55407&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=55407&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=55407&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=55407&r=dst IIS Stability: https://bugs.php.net/fix.php?id=55407&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=55407&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=55407&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=55407&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=55407&r=mysqlcfg