Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:27938 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 65620 invoked by uid 1010); 9 Feb 2007 10:57:08 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 65605 invoked from network); 9 Feb 2007 10:57:08 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 Feb 2007 10:57:08 -0000 Authentication-Results: pb1.pair.com smtp.mail=olivier@elma.fr; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=olivier@elma.fr; sender-id=pass Received-SPF: pass (pb1.pair.com: domain elma.fr designates 213.41.14.138 as permitted sender) X-PHP-List-Original-Sender: olivier@elma.fr X-Host-Fingerprint: 213.41.14.138 mail.elma.fr Linux 2.6 Received: from [213.41.14.138] ([213.41.14.138:56305] helo=mailer.elma.fr) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 44/FF-18147-3835CC54 for ; Fri, 09 Feb 2007 05:57:07 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by mailer.elma.fr (Postfix) with ESMTP id 0B6852DE965 for ; Fri, 9 Feb 2007 11:57:05 +0100 (CET) Received: from mailer.elma.fr ([127.0.0.1]) by localhost (mailer [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 24902-01 for ; Fri, 9 Feb 2007 11:57:04 +0100 (CET) Received: from nike.elma.loc (nike.elma.loc [10.0.1.10]) by mailer.elma.fr (Postfix) with ESMTP id EAFF12DE964 for ; Fri, 9 Feb 2007 11:57:04 +0100 (CET) To: internals@lists.php.net Date: Fri, 9 Feb 2007 11:56:51 +0100 User-Agent: KMail/1.9.5 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-ID: <200702091156.51781.olivier@elma.fr> X-Virus-Scanned: by amavis at elma.fr Subject: [SPL] ArrayObject::offsetExists From: olivier@elma.fr (Olivier Sirven) Hi, I am not sure whether I should post here or into php-general so feel free to bug me away ;) Anyway I have found a difference with ArrayObject::offsetExists between php 5.2.0 and php 5.2.1. With 5.2.0 ArrayObject::offsetExists will return "true" if the offsetExists whether its value is empty or not. This feature is not working anymore with 5.2.1 as it checks for the emptyness of the value too. In other words this code will throw an exception with php 5.2.1 and will work just fine with php 5.2.0: offsetSet('property', 0); if (!$a->offsetExists('property')) { throw new Exception('does not exists'); } echo "ok\n"; ?> Should I report it as a bug or is this a feature? Olivier