Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:52515 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 9204 invoked from network); 27 May 2011 07:17:39 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 27 May 2011 07:17:39 -0000 Authentication-Results: pb1.pair.com header.from=tyra3l@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=tyra3l@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.215.42 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: tyra3l@gmail.com X-Host-Fingerprint: 209.85.215.42 mail-ew0-f42.google.com Received: from [209.85.215.42] ([209.85.215.42:44093] helo=mail-ew0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 08/41-25602-F005FDD4 for ; Fri, 27 May 2011 03:17:36 -0400 Received: by ewy2 with SMTP id 2so531637ewy.29 for ; Fri, 27 May 2011 00:17:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=LcAwkBz8Hbrztzv8Bg7LcGa8sSGURC2sB4iFOIda73Y=; b=W7rHZnSYDo859UOQtJvHXslRVRFAP8tSWHglIB/4ZWvWBkKupk2C+ys6W1Gn0cqsgc QCfMcEs/s2U7Q98ISmP9cITOPMiiJfKYeGQKlidugCLgNAjStEXZs2vzDOzJEWXdryKW TeoaXuJVJ5rqcEH3+4TpmgvanKEFu5WnzuCJY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; b=vxPvnh68JQ2/qwLh8j3uGCTyhpBwLHfbMs4k1m2P5dZgLgvtkE0M9pAG2pksfL3sY1 8g21hKwK3RluRAm+GtwB2SEHPlvEwzutVKGqV46l2ym6ryMeED8rjK2ETtthfOml5iVZ /eCi7JjMwjnXTdxfaDdalI5ZL6LH1Z2hqtpEY= MIME-Version: 1.0 Received: by 10.14.18.24 with SMTP id k24mr612959eek.224.1306480652745; Fri, 27 May 2011 00:17:32 -0700 (PDT) Sender: tyra3l@gmail.com Received: by 10.14.29.5 with HTTP; Fri, 27 May 2011 00:17:32 -0700 (PDT) In-Reply-To: <2EFE9027-13EA-4570-B6D2-2C56D85C7DAE@macvicar.net> References: <2EFE9027-13EA-4570-B6D2-2C56D85C7DAE@macvicar.net> Date: Fri, 27 May 2011 09:17:32 +0200 X-Google-Sender-Auth: hUkHx3192Bh6igeWLcwVVCUwnro Message-ID: To: Scott MacVicar Cc: Philip Olson , PHP Internals Content-Type: multipart/alternative; boundary=0016e656b672367b8704a43cbb84 Subject: Re: [PHP-DEV] INF behavior From: info@tyrael.hu (Ferenc Kovacs) --0016e656b672367b8704a43cbb84 Content-Type: text/plain; charset=UTF-8 On Fri, May 27, 2011 at 6:10 AM, Scott MacVicar wrote: > On 26 May 2011, at 20:03, Philip Olson wrote: > > > Hello geeks, > > > > A geek is needed to clarify PHP bug #45712. This is an edge case but the > test (bug45712.phpt) contains code similar to the following: > > > > > $inf = pow(0, -2); > > > > var_dump($inf); // float(INF) > > var_dump($inf == $inf); // bool(false) > > var_dump($inf === $inf); // bool(true) > > ?> > > > > That's how it's behaved since ~forever (AFAICT) and remains in 5.3.7-dev, > but PHP 5.4.0-dev changes behavior so both now return true. > > > > 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 == and === produce different results. > > Though if someone has a better understanding of maths then we can fix it. > > S > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > https://twitter.com/#!/SaraMG/status/73903500198821888 @PhilipOlson If anything it should be: inf==inf, but inf !== inf. After all, not all infinities are the same, but they are all infinite. and I agree with Sara on this one. Tyrael --0016e656b672367b8704a43cbb84--