Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:55058 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 60036 invoked from network); 1 Sep 2011 14:00:33 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 1 Sep 2011 14:00:33 -0000 Authentication-Results: pb1.pair.com header.from=christian.stocker@liip.ch; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=christian.stocker@liip.ch; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain liip.ch designates 207.126.144.115 as permitted sender) X-PHP-List-Original-Sender: christian.stocker@liip.ch X-Host-Fingerprint: 207.126.144.115 eu1sys200aog103.obsmtp.com Linux 2.5 (sometimes 2.4) (4) Received: from [207.126.144.115] ([207.126.144.115:59782] helo=eu1sys200aog103.obsmtp.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 27/BA-03466-DFF8F5E4 for ; Thu, 01 Sep 2011 10:00:30 -0400 Received: from mail-ew0-f46.google.com ([209.85.215.46]) (using TLSv1) by eu1sys200aob103.postini.com ([207.126.147.11]) with SMTP ID DSNKTl+P9GaiDRJsIAhQ1U1Ynt8G2QlXISGx@postini.com; Thu, 01 Sep 2011 14:00:29 UTC Received: by ewy4 with SMTP id 4so1048533ewy.19 for ; Thu, 01 Sep 2011 07:00:20 -0700 (PDT) Received: by 10.213.2.202 with SMTP id 10mr90319ebk.28.1314885620136; Thu, 01 Sep 2011 07:00:20 -0700 (PDT) Received: from pri7.local (77-58-253-248.dclient.hispeed.ch [77.58.253.248]) by mx.google.com with ESMTPS id b12sm40773een.64.2011.09.01.07.00.18 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 01 Sep 2011 07:00:19 -0700 (PDT) Message-ID: <4E5F8FF1.9040604@liip.ch> Date: Thu, 01 Sep 2011 16:00:17 +0200 Organization: Liip AG User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:6.0.1) Gecko/20110830 Thunderbird/6.0.1 MIME-Version: 1.0 To: Rob Richards CC: PHPdev References: <4E5F1996.4050002@liip.ch> In-Reply-To: X-Enigmail-Version: 1.3.1 OpenPGP: id=0748D5FE; url=http://gpg-keyserver.de/pks/lookup?op=get&search=0xC2BAFBC30748D5FE Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] simplexml inconsistencies in the last few releases (the same issue already discussed) From: christian.stocker@liip.ch (Christian Stocker) Hi Ok, it's committed chregu On 01.09.11 13:10, Rob Richards wrote: > imo new behavior in 5.3 > > Rob > > On Sep 1, 2011, at 1:35 AM, Christian Stocker wrote: > >> Hi >> >> It's about the two tests in >> >> http://svn.php.net/viewvc/php/php-src/branches/PHP_5_3/ext/simplexml/tests/008.phpt >> and >> http://svn.php.net/viewvc/php/php-src/branches/PHP_5_3/ext/simplexml/tests/bug48601.phpt >> >> which contractited themself and we had back and forth commits due to this. >> >> So we had the following history >> >> 5.3.0 old behaviour >> ... >> 5.3.3 new behaviour >> ... >> 5.3.7 old behaviour >> ... >> 5.4.0 new behaviour >> >> >> The main question now is, should we introduce back the new behavior in >> the 5.3 line? Since the new behaviour was already there since more than >> a year, but now isn't, i'm not sure, what to do. >> >> The good point about the new behaviour is that it's almost BC, so going >> from the old to the new shouldn't cause much problems, but vice versa it >> does. The reason is that if you do an valid xpath query which returns >> zero results, the old behaviour returned false, the new one returns an >> empty array, so before 5.3.3 you had to write >> >> *** >> $res = $sx->query("/some/xpath"); >> >> if ($res) { >> foreach($res as $node) {} >> } >> *** >> >> Which still will work with the new behaviour, but that "if" is not >> really needed with the new behaviour, so going back to the old one may >> break if nothing is found (there may be problems when you asked for >> "zero-results" with checking if $res is false) >> >> Anyway, I'd appreciate some opinions about introducing back the new >> beehaviour in 5.3 or not (I guess 5.3.8 wasn't the last 5.3 release :)) >> >> chregu >> >> >> -- >> Liip AG // Feldstrasse 133 // CH-8004 Zurich >> Tel +41 43 500 39 81 // Mobile +41 76 561 88 60 >> www.liip.ch // blog.liip.ch // GnuPG 0x0748D5FE >> >> >> -- >> PHP Internals - PHP Runtime Development Mailing List >> To unsubscribe, visit: http://www.php.net/unsub.php -- Liip AG // Feldstrasse 133 // CH-8004 Zurich Tel +41 43 500 39 81 // Mobile +41 76 561 88 60 www.liip.ch // blog.liip.ch // GnuPG 0x0748D5FE