Bug #67938 [Opn->Ver]: Segfault when extending interface method with variadic

From: Date: Sat, 30 Aug 2014 17:41:46 +0000
Subject: Bug #67938 [Opn->Ver]: Segfault when extending interface method with variadic
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-187351@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=67938&edit=1 ID: 67938 Updated by: nikic@php.net Reported by: lisachenko dot it at gmail dot com Summary: Segfault when extending interface method with variadic -Status: Open +Status: Verified Type: Bug Package: Reproducible crash Operating System: Windows 7 PHP Version: 5.6.0 -Assigned To: +Assigned To: nikic Block user comment: N Private report: N Previous Comments: ------------------------------------------------------------------------ [2014-08-30 17:24:48] lisachenko dot it at gmail dot com 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 ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=67938&edit=1

« previous php.bugs (#187351) next »