|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2016-04-28 15:18 UTC] levim@php.net
-PHP Version: Next Minor Version
+PHP Version: 7.0.6
-Assigned To:
+Assigned To: levim
[2016-04-28 15:18 UTC] levim@php.net
[2016-04-28 15:22 UTC] bwoebi@php.net
-Status: Assigned
+Status: Not a bug
-Assigned To: levim
+Assigned To:
[2016-04-28 15:22 UTC] bwoebi@php.net
[2016-04-28 15:23 UTC] levim@php.net
-Summary: Interface declaration compatibility
regression
+Summary: Interface declaration compatibility
regression with default values
-Assigned To:
+Assigned To: levim
[2016-04-28 15:23 UTC] levim@php.net
[2016-04-28 15:26 UTC] ben dot davies at gmail dot com
[2016-04-28 16:34 UTC] dmitry@php.net
[2016-04-28 16:42 UTC] bwoebi@php.net
[2016-04-28 16:50 UTC] rowan dot collins at gmail dot com
[2016-04-28 16:52 UTC] nikic@php.net
-Package: PHP Language Specification
+Package: Scripting Engine problem
[2016-04-28 16:58 UTC] dmitry@php.net
[2016-04-28 17:07 UTC] ab@php.net
[2016-04-28 17:14 UTC] dmitry@php.net
-Status: Not a bug
+Status: Closed
-Assigned To: levim
+Assigned To: dmitry
[2016-04-28 17:14 UTC] dmitry@php.net
[2016-04-28 17:43 UTC] ab@php.net
[2016-04-29 09:28 UTC] ben dot davies at gmail dot com
[2016-07-20 11:31 UTC] davey@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Nov 30 07:00:01 2025 UTC |
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.