Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:73408 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 89218 invoked from network); 25 Mar 2014 03:34:09 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 25 Mar 2014 03:34:09 -0000 Authentication-Results: pb1.pair.com header.from=smalyshev@sugarcrm.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=smalyshev@sugarcrm.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain sugarcrm.com designates 108.166.43.83 as permitted sender) X-PHP-List-Original-Sender: smalyshev@sugarcrm.com X-Host-Fingerprint: 108.166.43.83 smtp83.ord1c.emailsrvr.com Linux 2.6 Received: from [108.166.43.83] ([108.166.43.83:52644] helo=smtp83.ord1c.emailsrvr.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A2/C0-19971-E29F0335 for ; Mon, 24 Mar 2014 22:34:07 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp3.relay.ord1c.emailsrvr.com (SMTP Server) with ESMTP id CD989510A8; Mon, 24 Mar 2014 23:34:02 -0400 (EDT) X-Virus-Scanned: OK Received: by smtp3.relay.ord1c.emailsrvr.com (Authenticated sender: smalyshev-AT-sugarcrm.com) with ESMTPSA id 685D2511E3; Mon, 24 Mar 2014 23:34:02 -0400 (EDT) Message-ID: <5330F929.3080000@sugarcrm.com> Date: Mon, 24 Mar 2014 20:34:01 -0700 Organization: SugarCRM User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 MIME-Version: 1.0 To: Tjerk Meesters CC: Etienne Kneuss , PHP Internals References: <532A3E88.20202@sugarcrm.com> <532A418A.8020607@sugarcrm.com> <532B4A1B.5090503@sugarcrm.com> <532B6581.6030801@sugarcrm.com> <532B91AF.7090804@sugarcrm.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Merge PR 621 From: smalyshev@sugarcrm.com (Stas Malyshev) Hi! > Do you have any issues with the code as it stands now? > > https://github.com/php/php-src/pull/614 Something I don't understand in this patch: so if we don't have "has" override, we'd get value == NULL and then we go and check internal hashtable. Shouldn't we first check the get override and ask it with BP_VAR_IS, and only if get override is not there use direct hash access? E.g. imagine this: class SecretArrayObject extends ArrayObject { public function offsetGet($offset) { var_dump('Called: '.__METHOD__); return parent::offsetGet(str_rot13($offset)); } public function offsetSet($offset) { var_dump('Called: '.__METHOD__); return parent::offsetSet(str_rot13($offset)); } } I think on this example your code may fail to go to correct items when doing isset/isempty, since if I ask for 'qux' it would actually check the value I've put there for 'dhk'. -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227