Re: $arr = array('Hello', 'world'); $arr();
| From: | Pierre Joye | Date: | Sun, 05 Jun 2011 19:55:00 +0000 |
| Subject: | Re: $arr = array('Hello', 'world'); $arr(); | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-52960@lists.php.net to get a copy of this message | ||
On Sun, Jun 5, 2011 at 9:52 PM, Zeev Suraski <zeev@zend.com> wrote:
>> -----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...?
Hello::World(), like what you do in call user func, or similar to.
--
Pierre
@pierrejoye | http://blog.thepimp.net | http://www.libgd.org