Re: _call() and __callstatic() improvement

From: Date: Fri, 10 Apr 2015 08:10:55 +0000
Subject: Re: _call() and __callstatic() improvement
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-85765@lists.php.net to get a copy of this message
On Fri, Apr 10, 2015 at 7:26 AM, Paul Dragoonis <dragoonis@gmail.com> wrote: > Hi Dmitry, > > Although I recommend against the usage of __call/__callStatic from a > quality assurance perspective (part of my job), it's reassuring to know > that these methods have received more attention in terms of stability and > stack handling. > > After reviewing the code I'd still like to better understand the use of > the term trampoline and when it's appropriate to > use zend_get_call_trampoline_func() over the > existing zend_get_user_call_function() approach. > In our approach, "trampline" is a special opcode, that substitute existing "fake" stack frame with a frame to __call() function, similar to tail-call. Thanks. Dmitry. > > Many thanks, > Paul > > On Fri, Apr 10, 2015 at 12:20 AM, Dmitry Stogov <dmitry@zend.com> wrote: > >> Hi, >> >> Please review the patch. >> It improves implementation of magic __call() and __callstatic() methods >> using bytecode function with trampoline instead of internal C function. >> >> https://github.com/php/php-src/pull/1234 >> >> The patch is more or less obvious. >> I'm going to commit it tomorrow evening. >> >> Xinchen, you may also try to add support for Closure::invoke() (as a >> separate patch). >> >> Thanks. Dmitry. >> > >

« previous php.internals (#85765) next »