Re: BC break: ReflectionMethod::invoke() expects parameter 1 to be object, string given

From: Date: Mon, 22 Aug 2016 15:17:00 +0000
Subject: Re: BC break: ReflectionMethod::invoke() expects parameter 1 to be object, string given
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to internals+get-95381@lists.php.net to get a copy of this message
On 22/08/2016 15:32, Alexander Lisachenko wrote:
If the first argument for invoke() and invokeArgs() for static methods will be a string with compatible class name for the scope, then it can be used as a scope modifier (like second argument for Closure::bind($instance, $scopeClassName))
The problem with this is that you will only be able to use this with a version check - in prior versions, the argument will be silently accepted but ignored. That would make it extremely easy for any code relying on this to be subtly broken on older builds. Regards, -- Rowan Collins [IMSoP]

« previous php.internals (#95381) next »