On 22.08.2016 at 16:38, Rowan Collins wrote: > On 22/08/2016 12:17, Nicolas Grekas wrote: >> in ReflectionMethod::invoke(): >> >> the method doesn't accept a string as first argument anymore, see e.g.: >> >> https://3v4l.org/pImmv > > To be precise, in prior versions, the first argument was completely > ignored for static methods: https://3v4l.org/8o4Hm > > $m->invoke('some_other_class_name', 'baz'); // Warns in 7.1.0beta3, > ignores everywhere else > $m->invoke(42, 'baz'); // Warns in 7.1.0beta3, ignores everywhere else > $m->invoke(new DateTime, 'baz'); // OK in all versions > $m->invoke($m, 'baz'); // OK in all versions > > 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 <https://3v4l.org/n8cad>. Only as of 7.1.0beta3 ::invoke() matches the behavior of ::invokeArgs(). -- Christoph M. Becker -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php