Re: RE: [RFC] Fast Parameter Parsing API

From: Date: Mon, 26 May 2014 08:37:13 +0000
Subject: Re: RE: [RFC] Fast Parameter Parsing API
References: 1 2 3 4 5 6 7  Groups: php.internals 
Request: Send a blank email to internals+get-74488@lists.php.net to get a copy of this message
On 26 May 2014 10:24, Andrea Faulds <ajf@ajf.me> wrote: > Perhaps it could be simplified? Something like this: > > ZEND_PARSE_PARAMETERS(Z_PARAM_ARRAY, input, Z_PARAM_LONG, offset, Z_PARAM_OPTIONAL, > Z_PARAM_ZVAL, z_length, Z_PARAM_BOOL, preserve_keys); > > That’s still rather unwieldy, though. Maybe Z_PARAM could be shortened to ZP_? Then we’d > have this: > > ZEND_PARSE_PARAMETERS(ZP_ARRAY, input, ZP_LONG, offset, ZP_OPTIONAL, ZP_ZVAL, z_length, > ZP_BOOL, preserve_keys) > > That’s not so bad, right? That would be parsing at runtime instead of with macros, though. > Maybe this? > > ZEND_PARSE_PARAMETERS(ZP_ARRAY(input), ZP_LONG(offset), ZP_OPTIONAL, ZP_ZVAL(z_length), > ZP_BOOL(preserve_keys)) > WAT? Why does that look better to you than a) what we already have, and b) what Dmitry proposed? -- Regards, Mike

« previous php.internals (#74488) next »