Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:52514 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 95581 invoked from network); 27 May 2011 04:11:02 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 27 May 2011 04:11:02 -0000 Authentication-Results: pb1.pair.com smtp.mail=scott@macvicar.net; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=scott@macvicar.net; sender-id=unknown Received-SPF: error (pb1.pair.com: domain macvicar.net from 74.125.83.170 cause and error) X-PHP-List-Original-Sender: scott@macvicar.net X-Host-Fingerprint: 74.125.83.170 mail-pv0-f170.google.com Received: from [74.125.83.170] ([74.125.83.170:41430] helo=mail-pv0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B9/30-25602-5542FDD4 for ; Fri, 27 May 2011 00:11:02 -0400 Received: by pvh21 with SMTP id 21so643466pvh.29 for ; Thu, 26 May 2011 21:10:58 -0700 (PDT) Received: by 10.68.36.10 with SMTP id m10mr711190pbj.224.1306469458199; Thu, 26 May 2011 21:10:58 -0700 (PDT) Received: from [10.118.230.167] ([166.205.137.180]) by mx.google.com with ESMTPS id p5sm171778pbd.76.2011.05.26.21.10.56 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 26 May 2011 21:10:57 -0700 (PDT) References: In-Reply-To: Mime-Version: 1.0 (iPhone Mail 8J2) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Message-ID: <2EFE9027-13EA-4570-B6D2-2C56D85C7DAE@macvicar.net> Cc: PHP Internals X-Mailer: iPhone Mail (8J2) Date: Thu, 26 May 2011 21:10:30 -0700 To: Philip Olson Subject: Re: [PHP-DEV] INF behavior From: scott@macvicar.net (Scott MacVicar) On 26 May 2011, at 20:03, Philip Olson wrote: > Hello geeks, >=20 > A geek is needed to clarify PHP bug #45712. This is an edge case but the t= est (bug45712.phpt) contains code similar to the following: >=20 > $inf =3D pow(0, -2); >=20 > var_dump($inf); // float(INF) > var_dump($inf =3D=3D $inf); // bool(false) > var_dump($inf =3D=3D=3D $inf); // bool(true) > ?> >=20 > That's how it's behaved since ~forever (AFAICT) and remains in 5.3.7-dev, b= ut PHP 5.4.0-dev changes behavior so both now return true. >=20 > Is this is how we want it? And how should this be documented/explained? I think I changes this :-) It didn't make sense that =3D=3D and =3D=3D=3D produce different results. Though if someone has a better understanding of maths then we can fix it. S=