Bug #72119 [NEW]: Interface declaration compatibility regression

From: Date: Thu, 28 Apr 2016 11:33:39 +0000
Subject: Bug #72119 [NEW]: Interface declaration compatibility regression
Groups: php.standards 
Request: Send a blank email to standards-+get-1079@lists.php.net to get a copy of this message
From: ben dot davies at gmail dot com Operating system: PHP version: Next Minor Version Package: PHP Language Specification Bug Type: Bug Bug description:Interface declaration compatibility regression Description: ------------ I wanted to raise this against 7.0.6, but it was not available in the list above, despite being released? There seems to be a regression in interface method declaration compatibility checking. The below test script only fails on 7.0.6. It also only fails if the $baz is type hinted as array. Test script: --------------- <?php interface Foo { public function bar(array $baz = null); } class Hello implements Foo { public function bar(array $baz = []) { } } Expected result: ---------------- N/A Actual result: -------------- Fatal error: Declaration of Hello::bar(array $baz = Array) must be compatible with Foo::bar(array $baz = NULL) in /in/VhEtd on line 7 Process exited with code 255. -- Edit bug report at https://bugs.php.net/bug.php?id=72119&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=72119&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=72119&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=72119&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=72119&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=72119&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=72119&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=72119&r=needscript Try newer version: https://bugs.php.net/fix.php?id=72119&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=72119&r=support Expected behavior: https://bugs.php.net/fix.php?id=72119&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=72119&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=72119&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=72119&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=72119&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=72119&r=dst IIS Stability: https://bugs.php.net/fix.php?id=72119&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=72119&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=72119&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=72119&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=72119&r=mysqlcfg

« previous php.standards (#1079) next »