Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:87717 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 98564 invoked from network); 11 Aug 2015 20:10:54 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 Aug 2015 20:10:54 -0000 Authentication-Results: pb1.pair.com header.from=php_lists@realplain.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=php_lists@realplain.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain realplain.com from 216.33.127.80 cause and error) X-PHP-List-Original-Sender: php_lists@realplain.com X-Host-Fingerprint: 216.33.127.80 mta11.charter.net Solaris 10 1203 Received: from [216.33.127.80] ([216.33.127.80:45159] helo=mta11.charter.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 4C/65-00789-DC65AC55 for ; Tue, 11 Aug 2015 16:10:53 -0400 Received: from imp09 ([10.20.200.9]) by mta11.charter.net (InterMail vM.8.01.05.09 201-2260-151-124-20120717) with ESMTP id <20150811201050.DCWH5815.mta11.charter.net@imp09>; Tue, 11 Aug 2015 16:10:50 -0400 Received: from mtaout004.msg.strl.va.charter.net ([68.114.190.29]) by imp09 with smtp.charter.net id 3YAq1r0050eWGlw05YAqhX; Tue, 11 Aug 2015 16:10:50 -0400 Received: from impout004 ([68.114.189.19]) by mtaout004.msg.strl.va.charter.net (InterMail vM.9.00.020.01 201-2473-160) with ESMTP id <20150811201050.WJDO1440.mtaout004.msg.strl.va.charter.net@impout004>; Tue, 11 Aug 2015 15:10:50 -0500 Received: from pc1 ([96.35.251.86]) by impout004 with charter.net id 3YAq1r0091sc0so01YAqKb; Tue, 11 Aug 2015 15:10:50 -0500 X-Authority-Analysis: v=2.1 cv=OIGp3EqB c=1 sm=1 tr=0 a=Is5gsZaFXO8aPum+t7Tz+g==:117 a=Is5gsZaFXO8aPum+t7Tz+g==:17 a=hOpmn2quAAAA:8 a=BCPeO_TGAAAA:8 a=N659UExz7-8A:10 a=1hrvc4cFybJebg8eqCQA:9 a=pILNOxqGKmIA:10 Message-ID: <04E6618E3189404FB15D042E588A90FC@pc1> To: "PHP Internals" , "Dmitry Stogov" References: <8BE12FDCDC5C457282790368866BD61E@pc1> Date: Tue, 11 Aug 2015 15:10:50 -0500 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="Windows-1252"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.5931 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Subject: Re: [PHP-DEV] Parameter parsing for zval type? From: php_lists@realplain.com ("Matt Wilmas") Hi Dmitry, ----- Original Message ----- From: "Dmitry Stogov" Sent: Tuesday, August 11, 2015 > Hi Matt, > > > On Tue, Aug 11, 2015 at 9:00 PM, Matt Wilmas > wrote: > >> Hi again, >> >> ----- Original Message ----- >> From: "Matt Wilmas" >> Sent: Tuesday, August 11, 2015 >> >> Hi Dmitry, all, >>> >>> Help me understand this. :-) It's been more puzzling to me recently >>> since just coming to the part of optimizing traditional ZPP (sharing >>> part >>> with FAST_ZPP...). >>> >>> With the FAST_ZPP inline macros, why is there a Z_PARAM_ZVAL and >>> Z_PARAM_ZVAL_DEREF? It seems the zpp 'z' specifier is always like >>> ZVAL_DEREF, right? So Z_PARAM_ZVAL has no equivalent in traditional >>> zpp. >>> At the very least, this would seem to suggest a difference in >>> behavior/functionality. But I haven't found any (or bug reports, if >>> tests >>> didn't cover something). >>> >> >> Oops! No, plain zpp 'z' does not have ZVAL_DEREF() applied, of course. >> But it's also using zend_parse_arg_zval_DEREF(), which is wrong... (in >> the >> case of "z!" with reference to IS_NULL?). > > > Sorry. I don't understand you without context. If you think something is > wrong in current implementation - please, demonstrate it with test cases, > examples or code references. If you talk about your code, then show it. Sorry, thought I gave enough context and code references! I can't demonstrate with a test case, which is why I'm asking about it. :-) No, not my code changes (you'll have plenty of code to see soon). I'm fine replicating the current logic exactly, as I have, but the logic of these couple parts doesn't make sense, to me. Let me try to simplify with couple examples... Look at e.g. is_numeric() or strpos() (needle). Plain zval param parsing, so NO ZVAL_DEREF() occurs (FAST_ZPP or traditional). These 2 example functions don't handle IS_REFERENCE type, so they would break. Or is there no way for them (or any function?) to get a IS_REFERENCE? Then *why* is there ZVAL_DEREF() in param parsing functions? We could remove it! Which is it...? > Thanks. Dmitry. Thanks, Matt