Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:95411 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 3038 invoked from network); 23 Aug 2016 13:41:02 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 23 Aug 2016 13:41:02 -0000 Authentication-Results: pb1.pair.com smtp.mail=julienpauli@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=julienpauli@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.49 as permitted sender) X-PHP-List-Original-Sender: julienpauli@gmail.com X-Host-Fingerprint: 74.125.82.49 mail-wm0-f49.google.com Received: from [74.125.82.49] ([74.125.82.49:36022] helo=mail-wm0-f49.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 63/77-49014-D625CB75 for ; Tue, 23 Aug 2016 09:41:02 -0400 Received: by mail-wm0-f49.google.com with SMTP id q128so164018394wma.1 for ; Tue, 23 Aug 2016 06:41:01 -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=lN/nVHVq6AaIesX/DWEKxqaL+ScEh2PQk4s6EDrfk0o=; b=yvGXWvj52IY/fNA9VqgF7gg+dlSH+jhQQbSmufRUEBSjFXggObR7JEJGDKbRm10RLC UrHilm7WtoE5odlS56Jkw9Ikvhp1nWVxuAfdrk4JZbY99q+Ip8DSn3LrvCb6FnekSLp4 juz1F6Cr1o9JlA+XvZN+iGODZNKPsRYOnC2Vl4phJAaZ9vLBHsZ3nbW4+RX4GRH1fFZ/ JPot1WSv8xvcWztVgJM4AhCkIjp62d/bV3B4LYIm3AfLtzq/RFEDooXvD8IG5KFiCWje rjtvhT8d7n1CXwvoinztnuf19IX5lLkwPG5BFTTbt4/8h06EDMQsm22XAmP+WJXFK+hE TvFQ== 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=lN/nVHVq6AaIesX/DWEKxqaL+ScEh2PQk4s6EDrfk0o=; b=BgaNrwvUgsjf00xpTwBHsWTjdIJTpqyQwYM4ZL+S0quwjzllsM9ao1/l+RjgEZcHol AsA9DDUN9RLSw4j+PuumMTMFT+gryMPJUQ++gvyXLDpBl19Dgv25XEL/QSFmwkiQ5N/3 r7+XpFFjDHWFL902Lj2ehR8yIgBLfcZuhwgaH7bxZ+GV0h9D86p7gdW0wuHsDkUyukKQ Zvozz9KyVXySmHiHYJLYIxDtOcpONXqUhauvFzNPNsNEZXVkxQC0Bqm/I6GinLGuXBOb 8Wop12PIx3RjZ0qhFS40Pq0/CdkgymU9SQMfLA/xQN3qIHQipbkznaHOdDlOlA9mx8H3 Lhqg== X-Gm-Message-State: AEkoous8NWSQbSme63kKrtues2fY30HPnW9VN3myOQjkHcgEY0UZF3IShl4vhCn0H3w2gr660bvkj86lPpcfRQ== X-Received: by 10.28.24.5 with SMTP id 5mr20659266wmy.6.1471959659021; Tue, 23 Aug 2016 06:40:59 -0700 (PDT) MIME-Version: 1.0 Sender: julienpauli@gmail.com Received: by 10.194.45.4 with HTTP; Tue, 23 Aug 2016 06:40:18 -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:40:18 +0200 X-Google-Sender-Auth: SJAEY-mn-Lj1b3ZQl7w2kVmWmWs 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:20 PM, Alexander Lisachenko wrote: > > 2016-08-23 16:13 GMT+03:00 Julien Pauli : >> >> >> 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. > > > > Ok, how can I invoke Parent::whoami() with reflection and get exactly > "Child" as an output? > > class Parent { > public static function whoami() { > echo static::class; > } > } > > class Child extends Parent { > public static function whoami() { > echo "Don't call me now!'; > parent::whoami(); > } > } > My patch allows that, but I can't find a use case to it. Try it. Julien