|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2014-08-30 17:41 UTC] nikic@php.net
-Status: Open
+Status: Verified
-Assigned To:
+Assigned To: nikic
[2014-08-30 18:46 UTC] nikic@php.net
[2014-08-30 18:46 UTC] nikic@php.net
-Status: Verified
+Status: Closed
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 21:00:01 2025 UTC |
Description: ------------ For traditional OOP code it's possible to add an "extra" optional arguments to the method defined somewhere in interface without violating it: interface TestInterface { public function foo(); } class Test implements TestInterface { public function foo($extraArgs=null) {} } $obj = new Test; $obj->foo(); For PHP5.6 variadics can be used nicely for that, but this results in the segfault. See: http://3v4l.org/9bcEJ Test script: --------------- interface TestInterface { public function foo(); } class Test implements TestInterface { public function foo(...$extraArgs) { } } $obj = new Test; $obj->foo(); Expected result: ---------------- Normal termination of script Actual result: -------------- Exit code 139, Segmentation fault