Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:96181 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 87182 invoked from network); 30 Sep 2016 10:57:54 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 30 Sep 2016 10:57:54 -0000 Authentication-Results: pb1.pair.com smtp.mail=php-mailing-list@lool.fr; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=php-mailing-list@lool.fr; sender-id=unknown Received-SPF: error (pb1.pair.com: domain lool.fr from 212.27.42.2 cause and error) X-PHP-List-Original-Sender: php-mailing-list@lool.fr X-Host-Fingerprint: 212.27.42.2 smtp2-g21.free.fr Received: from [212.27.42.2] ([212.27.42.2:45107] helo=smtp2-g21.free.fr) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 17/03-55621-E254EE75 for ; Fri, 30 Sep 2016 06:57:51 -0400 Received: from pcdepk (unknown [82.236.192.32]) by smtp2-g21.free.fr (Postfix) with ESMTP id 7E83E2003ED; Fri, 30 Sep 2016 12:57:47 +0200 (CEST) To: "'Thomas Punt'" , References: <001601d21b07$c1b76b70$45264250$@lool.fr> In-Reply-To: Date: Fri, 30 Sep 2016 12:57:45 +0200 Message-ID: <001f01d21b09$7995ed10$6cc1c730$@lool.fr> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0020_01D21B1A.3D212E10" X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQM4TEfcmiffmDxZwvXg1Ez/C1fi2wHO5h9QnbcCkKA= Content-Language: fr Subject: RE: [PHP-DEV] php short circuit bug? From: php-mailing-list@lool.fr ("Pascal KISSIAN") ------=_NextPart_000_0020_01D21B1A.3D212E10 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Sorry, =20 I did not saw that there were an =3D=3D on the right side, and thought = that It was an assignement=85. Thanks a lot =20 Best regards, Pascal KISSIAN =20 De : Thomas Punt [mailto:tpunt@hotmail.co.uk]=20 Envoy=E9 : vendredi 30 septembre 2016 12:51 =C0 : Pascal KISSIAN Objet : Re: [PHP-DEV] php short circuit bug? =20 Hi! =20 The warning is being emitted from the IF statement body, where you're = not actually performing an assignment, but a comparison instead: =20 $t_aa["bb"]=3D=3D"cc"; =20 -Tom =20 _____ =20 From: Pascal KISSIAN > Sent: 30 September 2016 11:45 To: internals@lists.php.net =20 Subject: [PHP-DEV] php short circuit bug?=20 =20 Hi everybody, =20 Perhaps am I making a mistake, but the following code fragment: =20 =20 Emits the following notice: PHP Notice: Undefined index: bb in test.php on line 4 =20 The php documentation : http://php.net/manual/en/language.operators.logical.php=20 PHP: Logical Operators - Manual php.net Logical Operators; Example Name Result $a and $b: And: TRUE if both $a = and $b are TRUE. $a or $b: Or: TRUE if either $a or $b is TRUE. $a xor $b: = Xor: TRUE if either ... states in exemple 1 that short circuit is implemented. =20 In my example as !isset($t_aa["bb"]) true, then the second expression ($t_aa["bb"]=3D=3D"")should not be evaluated! =20 Is it a php bug? Or am i missing something? =20 Cheers, Pascal KISSIAN ------=_NextPart_000_0020_01D21B1A.3D212E10--