Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:41368 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 93346 invoked from network); 24 Oct 2008 14:15:31 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Oct 2008 14:15:31 -0000 Received: from [127.0.0.1] ([127.0.0.1:14922]) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ECSTREAM id BC/96-01351-288D1094 for ; Fri, 24 Oct 2008 10:15:30 -0400 Authentication-Results: pb1.pair.com header.from=david@grudl.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=david@grudl.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain grudl.com from 80.79.20.227 cause and error) X-PHP-List-Original-Sender: david@grudl.com X-Host-Fingerprint: 80.79.20.227 keeper.orionet.cz Received: from [80.79.20.227] ([80.79.20.227:40192] helo=keeper.orionet.cz) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 48/76-01351-055D1094 for ; Fri, 24 Oct 2008 10:01:53 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by keeper.orionet.cz (Postfix) with ESMTP id 7769818405A3 for ; Fri, 24 Oct 2008 16:01:50 +0200 (CEST) Received: from keeper.orionet.cz ([127.0.0.1]) by localhost (keeper.orionet.cz [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 22148-04 for ; Fri, 24 Oct 2008 16:01:50 +0200 (CEST) Received: by keeper.orionet.cz (Postfix, from userid 1005) id 62DF0184060A; Fri, 24 Oct 2008 16:01:50 +0200 (CEST) Received: from [192.168.1.23] (unknown [77.240.188.66]) by keeper.orionet.cz (Postfix) with ESMTP id 2A65D18405A3 for ; Fri, 24 Oct 2008 16:01:50 +0200 (CEST) Message-ID: <4901D540.30607@grudl.com> Date: Fri, 24 Oct 2008 16:01:36 +0200 User-Agent: Thunderbird 2.0.0.17 (Windows/20080914) MIME-Version: 1.0 CC: 'PHP Internals' References: <4900DB81.4000805@zend.com> In-Reply-To: <4900DB81.4000805@zend.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at example.com Subject: Re: array_key_exists BC break From: david@grudl.com (David Grudl) Hello, I have reported this bug http://bugs.php.net/bug.php?id=46354, because new behaviour breaks my script. The question is how fix scripts for new behaviour. Example: // common array $a = array('item' => NULL); isset($a['item']) -> FALSE array_key_exists($a['item']) -> TRUE // ArrayObject $o = new ArrayObject($a); isset($o['item']) -> TRUE (!) $o->offsetExists($o['item']) -> TRUE (!), in PHP 5.2.1 FALSE (!) Should one rely on this 'isset' behaviour, i.e. will isset($a['item']) return TRUE in future? David Grudl