Re: [VOTE] Fix list() behavior inconsistency

From: Date: Fri, 26 Sep 2014 07:04:50 +0000
Subject: Re: [VOTE] Fix list() behavior inconsistency
References: 1 2 3 4 5 6 7 8  Groups: php.internals 
Request: Send a blank email to internals+get-77645@lists.php.net to get a copy of this message
Hi! > Long story short, because FETCH_DIM_R now supports CONST and TMP_VAR > operands, we can always use it and FETCH_DIM_TMP_VAR can be dropped - > that's all that has to be done in order to always support strings and > objects in list(). (I've linked a patch for this previously, see > https://github.com/nikic/php-src/compare/stringOffsetsInList). Excellent, IMO this is the most logical way to proceed - and I'm not sure why one check for one flag is something worth worrying about. Is it really that slow to check for one flag? > If I understood it correctly, then Dmitry's alternative is to add > support for CV and VAR operands to FETCH_DIM_TMP_VAR and always use that > for list(). This avoids having to check the ZEND_FETCH_ADD_LOCK flag in > FETCH_DIM_R. However I don't think that this optimization is related to > whether or not we support strings and objects. We can have a separate > opcode only for list() in either case, no matter which choice is made here. We can, of course, but with your explanation I don't really see why we even should... -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/

« previous php.internals (#77645) next »