Re: $arr = array('Hello', 'world'); $arr();
| From: | Felipe Pena | Date: | Sun, 05 Jun 2011 20:35:10 +0000 |
| Subject: | Re: $arr = array('Hello', 'world'); $arr(); | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-52967@lists.php.net to get a copy of this message | ||
Hi,
2011/6/5 Stas Malyshev <smalyshev@sugarcrm.com>
> Hi!
>
>
> So, I wrote a patch [2] that allow such behavior to be consistent with
>> arrays. See some examples:
>>
>
> Looks good. Only question I have is that we seem to have that code (calling
> a function based on variable) in two places instead of one, I wonder if it's
> necessary and if we could unify them...
>
We have the code to initialize the call from a object variable, and string
variable (function only) in this exact opcode ZEND_INIT_FCALL_BY_NAME, which
now treat the array case as well, there is no other place doing such stuff.
--
Regards,
Felipe Pena