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:[EMAIL PROTECTED] > Sent: Wednesday, May 31, 2006 12:19 PM > To: Dmitry Stogov; internals@lists.php.net > Cc: [EMAIL PROTECTED]; '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 <[EMAIL PROTECTED]> > >> >Reply-To: Marcus Boerger <[EMAIL PROTECTED]> > >> >To: Andi Gutmans <[EMAIL PROTECTED]>, Zeev Suraski <[EMAIL PROTECTED]>, > >> > Ilia Alshanetsky <[EMAIL PROTECTED]> > >> >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. > > > > -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php