Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:95379 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 6773 invoked from network); 22 Aug 2016 15:32:31 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 Aug 2016 15:32:31 -0000 Authentication-Results: pb1.pair.com header.from=cmbecker69@gmx.de; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=cmbecker69@gmx.de; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmx.de designates 212.227.15.18 as permitted sender) X-PHP-List-Original-Sender: cmbecker69@gmx.de X-Host-Fingerprint: 212.227.15.18 mout.gmx.net Received: from [212.227.15.18] ([212.227.15.18:52597] helo=mout.gmx.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 0A/61-33251-B0B1BB75 for ; Mon, 22 Aug 2016 11:32:27 -0400 Received: from [192.168.2.103] ([79.243.115.246]) by mail.gmx.com (mrgmx002) with ESMTPSA (Nemesis) id 0MZkic-1brrvV1W7a-00LSeL; Mon, 22 Aug 2016 17:32:23 +0200 To: Nicolas Grekas , "internals@lists.php.net" References: Message-ID: <4bfa2f62-1b47-633f-3401-59c71c50fc90@gmx.de> Date: Mon, 22 Aug 2016 17:32:48 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:6oxSMNQ7APj7yaEBp5aNQyBMXn8rBXNUG854rzkYpMngITa3wOB pmgk9cfvFZWazRi76M7d+UAP/Gb52OBAK7N5wXNAKcJrQIogly7nmGT3MZKmPgPl/dGeJYx B32EkSgEWbDi0Be5bCSbKBqJEIj8dd7zwUSRUVt+E++0uIVe6zrEJNotQ1Sj4igxS7VEF/M px0BPDipxH4ZuJBDefJwA== X-UI-Out-Filterresults: notjunk:1;V01:K0:TZwEj4myOnc=:61V43I6jz6rPnGL7UiFoXw haSHu8jTXP7us56YhDYJN85MFIAjciIY4rmSPDT9WuKavKjoVyMw4g6ckM+khCEPsEKRq4XvD wTbpmOrddgGjQq7sAKlxV2XGTpCE7JjANOPN18IOzyPFKs+gzSW79ncCqRBgNQJMJW/bMjsk1 13NNZIKc6XefZS5j6L3rusj5t8CTv3loOS5J3bZ8vRJKzNNkq/BcA+Nv/piDT+La9TEnh0679 uK8Dl2qsqvJHr6DKpy/MhfMAIcPmWr06p6B/eEJ/jjeLoeG4KOjLh5V4H3Kib0Rikh34tofrv qA9hntZfADWMnDo21AOYef6ukGaaJQWGnTJ7xsSTiXzzOR0P/DvhV+RqDh8xf5SFMTigLarMh OVPDE2/YkkHmSEv/UrL/BJq1HUnoWMnXrGL4mcUyhD/JVKOytCUjL6CF+AYOvbutaxsE+Tr4D C2c0ltnXWxihTFJl9TL+uxRRHWh3XgS+7v4wr/+rThfv6UeKVtXB1FfJyCsh33S6kfoE8IRwn yipKXknI82mulaucmNNFzLjBsgK06KwYJ8Id0WmZYlB8mdEAb+xX1+aExIglXq3K9o6UBOqJ+ jPDbTsplctKnZDz0aFxo2FpXNs4DnLBvDMzVXqRFfluBGgWft79e4H3APwirXmmYTWplRc3nh QtjHjSb4f5W1PGjm77CHpT51I1xsfhskRVJfVopwWjiknNGRUW6FGyVXLtv7QYQjuQzu4auCt 1FTIHQdP7T9hrxLnxawmVGu7fABoMO58sRQMH4hvrxZpObDhZ8mRPRq+i/IcX3+OzoYHEhlqs 2qAsoCZ Subject: Re: BC break: ReflectionMethod::invoke() expects parameter 1 to beobject, string given From: cmbecker69@gmx.de ("Christoph M. Becker") On 22.08.2016 at 13:17, Nicolas Grekas wrote: > now that the BC break on ReflectionType has been reverted, another one > remains in ReflectionMethod::invoke(): > > the method doesn't accept a string as first argument anymore, see e.g.: > > https://3v4l.org/pImmv > > As you can see, this worked since 5.0 and even in HHVM. > > It would be great to fix this BC break please. The BC break is caused by implementing feature requrest #38992 (), which has been posted nearly 10 years ago. My analysis as posted in the bug report: | Actually, the first parameter to ReflectionMethod::invoke() is | completely ignored, if the method is a static method, see | . A comment in the sources[1] also | explains the reasoning. | | This doesn't make any sense, however, because for static methods | to be invoked, NULL is supposed to be passed as first parameter to | ::invoke() as well as ::invokeArgs(). Allowing an arbitrary | argument is confusing at best. | | Changing the behavior would introduce a BC break, though, so it | appears to be reasonable to do that for PHP 7.1 only. | | [1] If so desired, I can revert that commit, but I wouldn't be happy with sticking with a completely unused parameter, which obviously has been and still is misunderstood. -- Christoph M. Becker