Hi,
2011/6/6 Dmitry Stogov
> Hi Felipe,
>
> I like the idea. It makes indirect method calls less expensive.
>
> I would add a hint to specializer, to eliminate small overhead for regular
> function calls.
>
> } else if (OP1_TYPE != IS_CONST &&
> EXPECTED(Z_TYPE_P(function_name) == IS_A
On 06/05/2011 08:52 AM, Felipe Pena wrote:
Hi all,
Reading our bug tracker I noticed a good feature request [1] from 2009 which
points to an interesting feature that I think makes sense for us, since we
are now working with $f() using objects and strings, and the array('class',
'method') is an
On 2011-06-06, Hannes Magnusson wrote:
> On Sun, Jun 5, 2011 at 17:52, Felipe Pena wrote:
> > Reading our bug tracker I noticed a good feature request [1] from 2009 which
> > points to an interesting feature that I think makes sense for us, since we
> > are now working with $f() using objects and
On Sun, Jun 5, 2011 at 17:52, Felipe Pena wrote:
> Hi all,
> Reading our bug tracker I noticed a good feature request [1] from 2009 which
> points to an interesting feature that I think makes sense for us, since we
> are now working with $f() using objects and strings, and the array('class',
> 'me
+1 , nice job
Julien
On Mon, Jun 6, 2011 at 12:53 PM, David Zülke
wrote:
> <3
>
> David
>
>
> On 05.06.2011, at 17:52, Felipe Pena wrote:
>
>> Hi all,
>> Reading our bug tracker I noticed a good feature request [1] from 2009 which
>> points to an interesting feature that I think makes sense for
<3
David
On 05.06.2011, at 17:52, Felipe Pena wrote:
> Hi all,
> Reading our bug tracker I noticed a good feature request [1] from 2009 which
> points to an interesting feature that I think makes sense for us, since we
> are now working with $f() using objects and strings, and the array('class'
Hi Felipe,
I like the idea. It makes indirect method calls less expensive.
I would add a hint to specializer, to eliminate small overhead for
regular function calls.
} else if (OP1_TYPE != IS_CONST &&
EXPECTED(Z_TYPE_P(function_name) == IS_ARRAY) &&
zend_hash_num_element
Hi!
1. We do not use zend_fcall_info stuff in the VM (which zend_is_callable
works in)
2. We have to use zend_do_fcall_common_helper instead of
zend_call_function() in the VM
Yes, I know, I just have a feeling we have two pieces of code doing the
same in different way. But I think your propos
+1
~Hannes
2011/6/5 Stas Malyshev
> Hi!
>
>
> 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.
>>
>
> What about cal
Hi!
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.
What about call_user_func() implementation? It must be doing p
Hi,
2011/6/5 Stas Malyshev
> 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 i
] $arr = array('Hello', 'world'); $arr();
Hi,
2011/6/5 Zeev Suraski mailto:z...@zend.com>>
> -Original Message-
> class Hello {
>public function world($x) {
> echo "Hello, $x\n"; return $this;
>}
> }
>
> $f = arr
Hi,
2011/6/5 Zeev Suraski
> > -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..?
Hi,
recently I was surprised this didn't work. so +1 from me.
johannes
On Sun, 2011-06-05 at 12:52 -0300, Felipe Pena wrote:
> Hi all,
> Reading our bug tracker I noticed a good feature request [1] from 2009 which
> points to an interesting feature that I think makes sense for us, since we
> are
On Sun, Jun 5, 2011 at 9:52 PM, Zeev Suraski 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 su
> -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..?
Zeev
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.
On Sun, Jun 5, 2011 at 5:52 PM, Felipe Pena wrote:
> Hi all,
> Reading our bug tracker I noticed a good feature request [1] from 2009
> which
> points to an interesting feature that I think makes sense for us, since we
> are now working with $f() using objects and strings, and the array('class',
On Sun, 2011-06-05 at 12:42 -0400, Pierre Joye wrote:
> +1, very good job!
>
> On Sun, Jun 5, 2011 at 5:52 PM, Felipe Pena wrote:
> > Hi all,
> > Reading our bug tracker I noticed a good feature request [1] from 2009 which
> > points to an interesting feature that I think makes sense for us, sinc
+1, very good job!
On Sun, Jun 5, 2011 at 5:52 PM, Felipe Pena wrote:
> Hi all,
> Reading our bug tracker I noticed a good feature request [1] from 2009 which
> points to an interesting feature that I think makes sense for us, since we
> are now working with $f() using objects and strings, and th
I consider this an improvement in terms of consistency w.r.t.
callbacks, so +1 from me, good job!
Best,
On Sun, Jun 5, 2011 at 18:21, Felipe Pena wrote:
> 2011/6/5 Benjamin Eberlei
>
>> That can lead to quite a bit of simplifications in code where you now have
>> to check for is_array/is_callab
2011/6/5 Benjamin Eberlei
> That can lead to quite a bit of simplifications in code where you now have
> to check for is_array/is_callable/instanceof Closure and such. I like it.
>
>
Exactly, and since our current $x = 'hello::world'; $x(); doesn't support
method calls, the array one can help on
That can lead to quite a bit of simplifications in code where you now have to
check for is_array/is_callable/instanceof Closure and such. I like it.
On Sun, 5 Jun 2011 12:52:45 -0300
Felipe Pena wrote:
> Hi all,
> Reading our bug tracker I noticed a good feature request [1] from 2009 which
> po
Hi all,
Reading our bug tracker I noticed a good feature request [1] from 2009 which
points to an interesting feature that I think makes sense for us, since we
are now working with $f() using objects and strings, and the array('class',
'method') is an old known for call_user_func()-like functions.
25 matches
Mail list logo