Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:56564 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 81557 invoked from network); 24 Nov 2011 10:35:09 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Nov 2011 10:35:09 -0000 Authentication-Results: pb1.pair.com smtp.mail=yohgaki@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=yohgaki@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.161.170 as permitted sender) X-PHP-List-Original-Sender: yohgaki@gmail.com X-Host-Fingerprint: 209.85.161.170 mail-gx0-f170.google.com Received: from [209.85.161.170] ([209.85.161.170:48066] helo=mail-gx0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 8E/E4-46656-BDD1ECE4 for ; Thu, 24 Nov 2011 05:35:08 -0500 Received: by ggnk1 with SMTP id k1so2684659ggn.29 for ; Thu, 24 Nov 2011 02:35:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=JODXghg7YhA1tQHiKMG+t+GnQJ3Y3rWwMFosue2+lWo=; b=bF2SXdRjxbZcP/KeTQoPRRRTcvet7og46BA7xo/Mc3Pvj/KtVUClnHphOYpWtoqFjU PLBO1ys8uk2zWtxnTkiKdi6a5OA4sCnopfeF2MWms33/Fj8MJcwUMlsTHoWEbMZ0SlGP dw3FRLXnQMFwRnIXJXtKrqS8fzPCadVYbu+O8= Received: by 10.236.155.36 with SMTP id i24mr30872035yhk.43.1322130905115; Thu, 24 Nov 2011 02:35:05 -0800 (PST) MIME-Version: 1.0 Sender: yohgaki@gmail.com Received: by 10.100.127.18 with HTTP; Thu, 24 Nov 2011 02:34:23 -0800 (PST) In-Reply-To: References: <20111123015008.GA12933@panix.com> <20111123023108.GA172@panix.com> <4ECCB549.904@lsces.co.uk> <4ECCBC56.3050602@sugarcrm.com> <20111123141408.GA11940@panix.com> <4ECD40E2.1000601@sugarcrm.com> <4ECD48AD.1020207@sugarcrm.com> <4ECD91F4.5040303@gmail.com> <4ECD92FD.7040609@sugarcrm.com> <4ECD9998.4060203@lsces.co.uk> <4ECDA01B.5090606@sugarcrm.com> Date: Thu, 24 Nov 2011 19:34:23 +0900 X-Google-Sender-Auth: oebgMguCSlxd2uO7P0dCOSFI5Yw Message-ID: To: devis@lucato.it Cc: Stas Malyshev , Lester Caine , PHP internals Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] 5.4 regression: non-existent sub-sub keys now have values From: yohgaki@ohgaki.net (Yasuo Ohgaki) 2011/11/24 : > On 24 November 2011 01:38, Stas Malyshev wrote: > Hi, > > I hadn't the opportunity to install php 5.4 to test this, so I was > wondering if someone could test how would this code behave ? > > ########### > if ( > !isset( $widget_options['dashboard_incoming_links'] ) > =A0|| !isset( $widget_options['dashboard_incoming_links']['home'] ) > =A0|| $widget_options['dashboard_incoming_links']['home'] !=3D get_option= ('home') ) > ########### > > Is that correct saying that if the first condition is false the second > will always be true ? > > Note: that's a piece of Wordpress [yohgaki@dev php-src-5.4]$ ./php -r 'var_dump(!isset($a["a"]["a"]));' bool(true) [yohgaki@dev php-src-5.4]$ ./php -r '$a =3D ["a"=3D>["a"=3D>1]];var_dump(!isset($a["a"]), $a);' bool(false) array(1) { ["a"]=3D> array(1) { ["a"]=3D> int(1) } } [yohgaki@dev php-src-5.4]$ ./php -r '$a =3D ["a"=3D>["a"=3D>1]];var_dump(!isset($a["a"]["a"]), $a);' bool(false) array(1) { ["a"]=3D> array(1) { ["a"]=3D> int(1) } } So it's not always true. -- Yasuo Ohgaki yohgaki@ohgaki.net