|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2019-01-23 11:22 UTC] cmb@php.net
-Status: Open
+Status: Closed
-Package: PHP Language Specification
+Package: Scripting Engine problem
-Assigned To:
+Assigned To: cmb
[2019-01-23 11:22 UTC] cmb@php.net
[2019-01-23 11:26 UTC] spam2 at rhsoft dot net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 10:00:01 2025 UTC |
Description: ------------ As it states in the summary, up until PHP 7.1.26, implementing an interface method without providing the full signature would cause a fatal error. Starting PHP 7.2.0 it appears to be more lax. In the example, the missing string parameter type is causing a fatal error prior to PHP 7.2.0. Test script: --------------- <?php interface SomeInterface { public function setSome(string $some); } class SomeClass implements SomeInterface { public function setSome($some){} } Expected result: ---------------- Fatal error: Declaration of SomeClass::setSome($some) must be compatible with SomeInterface::setSome(string $some)