Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:95407 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 95673 invoked from network); 23 Aug 2016 13:13:58 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 23 Aug 2016 13:13:58 -0000 Authentication-Results: pb1.pair.com header.from=julienpauli@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=julienpauli@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.54 as permitted sender) X-PHP-List-Original-Sender: julienpauli@gmail.com X-Host-Fingerprint: 74.125.82.54 mail-wm0-f54.google.com Received: from [74.125.82.54] ([74.125.82.54:34841] helo=mail-wm0-f54.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B2/F5-49014-51C4CB75 for ; Tue, 23 Aug 2016 09:13:58 -0400 Received: by mail-wm0-f54.google.com with SMTP id f65so162323009wmi.0 for ; Tue, 23 Aug 2016 06:13:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=yWQMe/Yv3yfijet++rijuyNAJFqmbszZ5R70k3+1rJc=; b=ULRXSlEBypH1WCVGOJKRFtmgVGtM/GYdrv5Aa8au5vtat90LjqM6ZqecLWSDOhhmEC 17ic+RZBWlWV/tHQODL8gWTtlfvBE+P+F9QQwRXwyqCrlrVgXGsWZUe6hodUvM4YNK7K fTEWWVvaIRa0o5DQSnzTbVD8b3DTK2XSF8Cj9eo25pK6u2VRNWU8FeU+5qcGC5x22EMy d8xDet1i1fPN+SlKdAwmLA6MuwzRWr1vfM5JQuSVn5vMYlZnALThWNsYM0hoaYLqaClB CyzMs06TeSnT6G9NZsnq/mtuQFx1kGqqAhwouaDcBD5OhhaZhN7sq7gI2VLM/u0+Aorc KoAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=yWQMe/Yv3yfijet++rijuyNAJFqmbszZ5R70k3+1rJc=; b=B/xqNMvE5UTNP5nvU+IHUdlUyOl2364B/WUoDDyPtLBfxKnux9dggKT9WnDNBkgeCg yV2uX3O11iBPoJ2oXjRIbdCM2kx7B2YVj1CW0lq/ZDl/O6/SfUXeO55xNPHTYE6En+yQ qvGaXH81OoPxr1aWfwgIlLBhzvv3K+J+YgAI+rIFUY9ec6H/WP9zJqgpE48rbXoacpHg vWcjhy3gDG3ZzVzb2YhOx169pymLmVsuZjQ1wkVX3SLVUhIRtr+qRfg5+CJpdy/G1rs0 oAh2bXbGyjbu4OF82LHVKjGx+E2BhMsTwwpQAo7d07ZRLajBwaTtLN3IilU4fm77W8Ab u1Dw== X-Gm-Message-State: AEkoouv3cMc1aNTJ3vPu89z10fCrqGLuywCPClDJgT8GeafjUckwQW1z0FtxRB40qU8VNz+fQyvIdKpCi/9yIQ== X-Received: by 10.28.39.133 with SMTP id n127mr20537302wmn.6.1471958035010; Tue, 23 Aug 2016 06:13:55 -0700 (PDT) MIME-Version: 1.0 Sender: julienpauli@gmail.com Received: by 10.194.45.4 with HTTP; Tue, 23 Aug 2016 06:13:14 -0700 (PDT) In-Reply-To: References: <031a2bf1-1996-1144-2b85-e10a40be9514@gmail.com> <7b81c830-1d05-a4ac-4713-1bb67cbec12c@gmx.de> Date: Tue, 23 Aug 2016 15:13:14 +0200 X-Google-Sender-Auth: 77Te3xxdqCoTG0OzkdEAQxZQMBk Message-ID: To: Alexander Lisachenko Cc: "Christoph M. Becker" , Levi Morrison , Rowan Collins , "internals@lists.php.net" Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] BC break: ReflectionMethod::invoke() expects parameter1to be object, string given From: jpauli@php.net (Julien Pauli) On Tue, Aug 23, 2016 at 3:07 PM, Alexander Lisachenko wrote: > > 2016-08-23 16:01 GMT+03:00 Julien Pauli : >> >> This : >> >> class A { public static function foo() { } } >> class B extends A { public static function foo() { } } >> >> $a = new reflectionMethod('A', 'foo'); >> $a->invoke('B'); > > > > It's perfect way for me. > Just to be sure: in this case we will invoke A::foo() method, but the scope > (static::class) will be 'B', right? If yes, then everything is ok and it No, How can this be ? B extends A , not A extends B ... In this case, B'sfoo() will be called , which is the equivalent to having a reflectionMethod from B , so useless to me. Julien