Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:89029 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 26370 invoked from network); 1 Nov 2015 21:49:10 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 1 Nov 2015 21:49:10 -0000 Authentication-Results: pb1.pair.com smtp.mail=lisachenko.it@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=lisachenko.it@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.217.169 as permitted sender) X-PHP-List-Original-Sender: lisachenko.it@gmail.com X-Host-Fingerprint: 209.85.217.169 mail-lb0-f169.google.com Received: from [209.85.217.169] ([209.85.217.169:36509] helo=mail-lb0-f169.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C9/79-13635-3D886365 for ; Sun, 01 Nov 2015 16:49:07 -0500 Received: by lbjm5 with SMTP id m5so76672859lbj.3 for ; Sun, 01 Nov 2015 13:49:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=ivSkuAaRE32ujbZzw4n782w29xaQmKcaesBRatBE72o=; b=sN6SP3AP4pMgyZmSfMSr/VbGzrgQcLWPgATTO67b0r/fwHGSV7L04SWKOqK/GIeks0 tgT9ZjnK0q3e5NLdbJZ8gawth8NU0RlD0RVCuPImdvigjlzH99QLYVLDMZU6+54GGxjR rtLhx0AndYr35bA2SYDgC+/nqxm+EB1UVh2O6s4eyTIvMSbaQohOIWnCzk4dRUlacNZ6 w93EdFRXbUhc/PO2NTQYEtEFGdr+2DcYyGNVQsnysreEh2ZnyNazUbGckAlZgbyGyKTK g5yhgqIrcmyPxip4IqcAYMCqkIOF2BQSvUwFwazdq0hrw5diAeJSovNdQ6auHqE5awPM DcqQ== MIME-Version: 1.0 X-Received: by 10.112.72.201 with SMTP id f9mr8766933lbv.62.1446414543855; Sun, 01 Nov 2015 13:49:03 -0800 (PST) Received: by 10.25.152.133 with HTTP; Sun, 1 Nov 2015 13:49:03 -0800 (PST) Date: Mon, 2 Nov 2015 00:49:03 +0300 Message-ID: To: PHP internals list Content-Type: multipart/alternative; boundary=001a11c24000160474052381a161 Subject: [Question] Variadic method signature compatibility between 5.6 and 7.0 From: lisachenko.it@gmail.com (Alexander Lisachenko) --001a11c24000160474052381a161 Content-Type: text/plain; charset=UTF-8 Hello, internals! I have a question about changed behavior in 7.0 for matching signature of variadic method. Here is an example of code: class Foo { public static function test($bar = null) { var_dump(func_get_args()); } } class Baz extends Foo { public static function test(...$args) { parent::test(...$args); } } Baz::test(); Baz::test('hello'); For 5.6 this code works normally, but in 7.0 it produces a warning about signature: "Warning: Declaration of Baz::test(...$args) should be compatible with Foo::test($bar = NULL)" See https://3v4l.org/so6P2 From userland point of view, these signatures should be compatible, so I decided to check this behavior, was it intended or not. Thanks! --001a11c24000160474052381a161--