Ok, that makes much more sense. Given how everyone loved it I was beginning to wonder whether I’ve become too old to understand simple pieces of code ☺
Zeev From: Felipe Pena [mailto:felipe...@gmail.com] Sent: Sunday, June 05, 2011 11:02 PM To: Zeev Suraski Cc: internals Subject: Re: [PHP-DEV] $arr = array('Hello', 'world'); $arr(); Hi, 2011/6/5 Zeev Suraski <z...@zend.com<mailto:z...@zend.com>> > -----Original Message----- > class Hello { > public function world($x) { > echo "Hello, $x\n"; return $this; > } > } > > $f = array(new Hello, 'foo'); > $f(); Am I the only one who doesn't understand what this one is supposed to do..? If you are refering to the 'foo' method and the lack of arg, it's was a typo... The right one: <?php class Hello { public function world($x) { echo "Hello, $x\n"; return $this; } } $f = array(new Hello, 'world'); $f('devs'); -- Regards, Felipe Pena