RE: MFHing zend_fcall_info_*() to 5.2
| From: | Dmitry Stogov | Date: | Wed, 31 May 2006 10:46:59 +0000 |
| Subject: | RE: MFHing zend_fcall_info_*() to 5.2 | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-23821@lists.php.net to get a copy of this message | ||
Hmm,
Seems 'f' really make sense for simplification.
I am not sure about other helpers.
I'll need to review patch once again.
Could you include some use-cases (SPL patch that uses this one)?
Thanks. Dmitry.
> -----Original Message-----
> From: Marcus Boerger [mailto:mail@marcus-boerger.de]
> Sent: Wednesday, May 31, 2006 12:19 PM
> To: Dmitry Stogov; internals@lists.php.net
> Cc: stas@zend.com; 'Andi Gutmans'; Zeev Suraski
> Subject: Re: MFHing zend_fcall_info_*() to 5.2
>
>
> Hello Dmitry,
>
> my patch doesn't change anything. If just adds stuff that
> deals with defined functions only. If now you want to support
> all functions that can be defined later it wouldn't work this
> way (1). Actually it would require parsing the zval and
> checking whether it might get callable in some future. While
> this is the right solution for error handlers it is not the
> right way for stuff like callback in array and SPL functions.
> Once those are called the callback is used hence there is no
> way it can suddenly come out of nowhere. My patch now
> adresses this in a way that is much more efficient than doing
> a two phase approach.
>
> best regards
> marcus
>
> (1) I experiemened with 'F' parsing that only verified if
> something might get callable at some point. Though that
> worked it was unneccessary slow for the intended purpose.
>
> Wednesday, May 31, 2006, 8:29:01 AM, you wrote:
>
> > Hi Marcus,
>
> > We discussed the patch.
>
> > Several notes:
> > PHP allowed pass callback function or method that is not
> defined yet.
> > Your patch disallows this.
>
> > <?php
> > some_internal_func("foo");
> > eval("function foo() {}");
> ?>>
>
> > Usage of default values for functions will be problematic
> with it. I
> > don't think that we really need special case for 'callback'
> afguments.
> > (It would be good for strong-typed language).
>
> > According to helpers, I would like suggest to add them into SPL
> > itself and don't overload ZE.
>
> I can do so but don't see sense in doing so.
>
> best regards
> marcus
>
> >> >Date: Sat, 27 May 2006 22:32:13 +0200
> >> >From: Marcus Boerger <helly@php.net>
> >> >Reply-To: Marcus Boerger <helly@php.net>
> >> >To: Andi Gutmans <andi@zend.com>, Zeev Suraski <zeev@zend.com>,
> >> > Ilia Alshanetsky <iliaa@php.net>
> >> >Cc: internals@lists.php.net
> >> >Subject: MFHing zend_fcall_info_*() to 5.2
> >> >X-Bogosity: No, tests=bogofilter, spamicity=0.000475,
> version=0.92.8
> >> >
> >> >Hello Andi, Zeev, Ilia,
> >> >
> >> > the attached patch adds three new functions that make calling
> >> >functions a lot easier - at least for me in SPL. And it also
> >> does a few
> >> >things correct which are probably overseen easily. The
> >> addition works
> >> >in HEAD already and paases all memcheck tests idid so far.
>
>
>
>