Re: array_key_exists BC break

From: Date: Tue, 28 Oct 2008 14:41:13 +0000
Subject: Re: array_key_exists BC break
References: 1 2 3 4 5 6 7 8 9 10  Groups: php.internals 
Request: Send a blank email to internals+get-41524@lists.php.net to get a copy of this message
2008/10/28 Stan Vassilev | FM <sv_forums@fmethod.com>: >> <?php >> class Test >> { >> public function hello($who) >> { >> echo 'Hello ' . $who; >> } >> } >> >> $closure = function() >> { >> static $instance; >> >> if(!$instance) >> { >> $instance = new Test; >> } >> >> return($instance); >> }; >> >> $closure->hello('Kalle'); // Fatal error, undefined method >> Closure::hello() >> >> But you should indeed make an RFC for this and even create a patch if >> you're able to :) > > Technically since the closure holds a function returning the object, it > should be: doh yes, I must be sleeping :) > > $closure()->hello('Kalle'); > > Regards, Stan Vassilev > -- Kalle Sommer Nielsen

« previous php.internals (#41524) next »