RE: MFHing zend_fcall_info_*() to 5.2

From: Date: Mon, 05 Jun 2006 07:57:27 +0000
Subject: RE: MFHing zend_fcall_info_*() to 5.2
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-23959@lists.php.net to get a copy of this message
Hi Marcus, SPL code with this patch looks great, but ZE overloaded with helpers those are useful only for iterators. I wondered that ZE hasn't any helper for IS_ARRAY to arguments array conversion (may be I missed it). I suggest reimplement zend_fcall_info_args() into zval *** zend_create_parameters_array(zval *args); and remove zend_fcall_info_call() Thanks. Dmitry. > -----Original Message----- > From: Marcus Boerger [mailto:helly@php.net] > Sent: Sunday, June 04, 2006 4:14 PM > To: Dmitry Stogov > Cc: internals@lists.php.net; stas@zend.com; 'Andi Gutmans'; > 'Zeev Suraski' > Subject: Re: MFHing zend_fcall_info_*() to 5.2 > > > Hello Dmitry, > > the 'f' requires at least the first helper, so it makes > sense to have all three of them in the engine. Attached you > will find the patch for the helpers and the 'f' thingie for > 5.2 and an additional patch for SPL to introduce > iterator_apply() which uses the stuff. > > marcus > > Wednesday, May 31, 2006, 12:46:59 PM, you wrote: > > > 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. > >> > >> > >> > >> > > > > > > Best regards, > Marcus >

« previous php.internals (#23959) next »