Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:41369 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 42725 invoked from network); 24 Oct 2008 17:05:28 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Oct 2008 17:05:28 -0000 Authentication-Results: pb1.pair.com header.from=stas@zend.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=stas@zend.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 212.25.124.163 as permitted sender) X-PHP-List-Original-Sender: stas@zend.com X-Host-Fingerprint: 212.25.124.163 il-gw1.zend.com Windows 2000 SP4, XP SP1 Received: from [212.25.124.163] ([212.25.124.163:61566] helo=il-gw1.zend.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 3E/21-01351-55002094 for ; Fri, 24 Oct 2008 13:05:27 -0400 Received: from us-ex1.zend.com ([192.168.16.5]) by il-gw1.zend.com with Microsoft SMTPSVC(6.0.3790.3959); Fri, 24 Oct 2008 19:05:51 +0200 Received: from [192.168.16.110] ([192.168.16.110]) by us-ex1.zend.com with Microsoft SMTPSVC(6.0.3790.3959); Fri, 24 Oct 2008 10:05:48 -0700 Message-ID: <4902006C.7030501@zend.com> Date: Fri, 24 Oct 2008 10:05:48 -0700 Organization: Zend Technologies User-Agent: Thunderbird 2.0.0.17 (Windows/20080914) MIME-Version: 1.0 To: =?ISO-8859-1?Q?Johannes_Schl=FCter?= CC: Alexey Zakhlestin , Ionut Gabriel Stan , Mark van der Velden , PHP Internals References: <4900DB81.4000805@zend.com> <4900E150.1010607@dynom.nl> <49018FC3.90302@gmail.com> <1224854888.19390.89.camel@goldfinger.johannes.nop> In-Reply-To: <1224854888.19390.89.camel@goldfinger.johannes.nop> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 24 Oct 2008 17:05:48.0811 (UTC) FILETIME=[C319BDB0:01C935FA] Subject: Re: [PHP-DEV] array_key_exists BC break From: stas@zend.com (Stanislav Malyshev) Hi! > nope that would mean that some scripts might work different between 5.2 > and 5.3, now one gets an error. consider such a script: Just so it is clear - some scripts ALREADY work differently, that's why it says "BC break". > class Foo extends ArrayAccess { > public $prop = 42; > function offsetGet($n) { ... } > .... > } > > $o = new foo; > array_key_Exists('prop', $o); > ?> > > In <= 5.2 it will return the value of $o->prop, in 5.3 it would call the > offsetGet() method. In 5.2 it would return true and not the value of $o->prop. In 5.3 I don't think it would call offsetGet. It would call get_properties method of ArrayAccess, and that should return list of object's properties as array, so in this case the return will still be true. -- Stanislav Malyshev, Zend Software Architect stas@zend.com http://www.zend.com/ (408)253-8829 MSN: stas@zend.com