Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:95383 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 13570 invoked from network); 22 Aug 2016 15:55:37 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 Aug 2016 15:55:37 -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.215.42 as permitted sender) X-PHP-List-Original-Sender: lisachenko.it@gmail.com X-Host-Fingerprint: 209.85.215.42 mail-lf0-f42.google.com Received: from [209.85.215.42] ([209.85.215.42:36416] helo=mail-lf0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id EF/D2-33251-7702BB75 for ; Mon, 22 Aug 2016 11:55:35 -0400 Received: by mail-lf0-f42.google.com with SMTP id g62so81087466lfe.3 for ; Mon, 22 Aug 2016 08:55:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:cc; bh=3gAIt9xr4R63d6Qc6/nRJvd9OKzoyqygpHHLWSnQ9y8=; b=gxTeSJ5TilLIdNlNY4GQKN7oKVHfjxGfpuQoAodnx1YqW1INS8mWqdvo6saQNJZcFk mNM8Q7KcsnZS0zHbZXD03y3M3bMoWxUNiC14sW3cnp2l5R9UKB9KQQusUguVmk8JtreJ 3LxDOpkGDjGAelJxBY+N6vUmJe/3zdLoY7vA/TFhyWewx+GfIaKS9khc1e0yNYFm4oR8 FPSj7etZ1CMDfpnC1nk0MIMoCubOYcVaKtCxjBSJJCRn/B4Xrdyh4lF1/tKmJzTCcot/ jAGetDyGYSA+9EpTDhdVcTuXsf/Bl28tU0JctMS5bpNZ71O3UMeAB7a2iNym5motn/7l rpYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc; bh=3gAIt9xr4R63d6Qc6/nRJvd9OKzoyqygpHHLWSnQ9y8=; b=d1qtqNcbWNJP/yQpdoZbOo4QVP14fq6laBL5dmHpBVOFFhb8Aswjr58k9Lj+ZnlE4A P+SIUhTNS8zCo86Y/Y9jjySUWI2SfrMubYYqbbj8E0fGGTj6WtiMXY+9EZGML9EU3/9C 9D8PUz+FcDhdkN/APx0Z/ePTbIwvn8aYhKrCmGnt7cAJxvAOB/UflIQQRSq+aNIPo5va JGttJ6tcvdGUyTQqzYDAfiSz6cGwtvvYT80btAv7FumBgOLE/WrAW7XKAxc8r8eXvzH9 iDPrsNYfsxP7uIgtSDcdB7FO5eX2jxk+NSBi6R8LHi2ITbEv92+BZGtfVh3zcB3UpT5W xO0g== X-Gm-Message-State: AEkoouu+vI5yeGA9Po3CFGdbRfgP832Ihe+ukmfLJDEsKh8kgdvJUwsI6uzKWbQIwgI6XWrSjBz+hKbobEIA7Q== X-Received: by 10.25.134.65 with SMTP id i62mr4794177lfd.128.1471881331566; Mon, 22 Aug 2016 08:55:31 -0700 (PDT) MIME-Version: 1.0 Received: by 10.25.196.144 with HTTP; Mon, 22 Aug 2016 08:55:30 -0700 (PDT) Date: Mon, 22 Aug 2016 18:55:30 +0300 Message-ID: To: Rowan Collins Cc: "internals@lists.php.net" Content-Type: multipart/alternative; boundary=001a113e8526eb6f2f053aab1328 Subject: Re: [PHP-DEV] BC break: ReflectionMethod::invoke() expects parameter 1 to be object, string given From: lisachenko.it@gmail.com (Alexander Lisachenko) --001a113e8526eb6f2f053aab1328 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable First argument can be a normal string with a valid scope class name for static methods. This can be useful for calling parent static methods, see my example. I think this will be comparable with Closure::call() method and scope binding. =D0=BF=D0=BE=D0=BD=D0=B5=D0=B4=D0=B5=D0=BB=D1=8C=D0=BD=D0=B8=D0=BA, 22 =D0= =B0=D0=B2=D0=B3=D1=83=D1=81=D1=82=D0=B0 2016 =D0=B3. =D0=BF=D0=BE=D0=BB=D1= =8C=D0=B7=D0=BE=D0=B2=D0=B0=D1=82=D0=B5=D0=BB=D1=8C Rowan Collins =D0=BD=D0= =B0=D0=BF=D0=B8=D1=81=D0=B0=D0=BB: > On 22/08/2016 16:40, Christoph M. Becker wrote: > >> It is still ignored if it is a valid object, so the current beta's >>> > behaviour doesn't actually make a lot of sense. >>> >> Well, see . Only as of 7.1.0beta3 ::invoke() >> matches the behavior of ::invokeArgs(). >> > > OK, so that's a further inconsistency. The current version still doesn't > actually make sense, though. If you want to validate that the correct > argument is being passed, then the only value allowed should be null. > > 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. >> > > The parameter is still unused, and can be any object. The only sane > validation would be to check explicitly for null, which is documented as > the correct argument for both invoke() and invokeArgs(). > > Regards, > -- > Rowan Collins > [IMSoP] > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > --001a113e8526eb6f2f053aab1328--