Bug #75349 [Fbk->Opn]: NAN comparison
| From: | cmb@php.net | Date: | Tue, 10 Oct 2017 11:49:42 +0000 |
| Subject: | Bug #75349 [Fbk->Opn]: NAN comparison | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-211608@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=75349&edit=1
ID: 75349
Updated by: cmb@php.net
Reported by: fdivitto at gmail dot com
Summary: NAN comparison
-Status: Feedback
+Status: Open
Type: Bug
Package: Scripting Engine problem
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
This bug has been fixed with <http://git.php.net/?p=php-src.git;a=commit;h=c562d44>,
but probably should have a NEWS entry, pointing to this ticket.
Previous Comments:
------------------------------------------------------------------------
[2017-10-10 10:20:43] spam2 at rhsoft dot net
it is fixed at least in 7.1.10 and hence "irrelevant" is always wrong to start with
following http://www.catb.org/esr/faqs/smart-questions.html#beprecise
[harry@srv-rhsoft:~]$ php -v
PHP 7.1.10 (cli) (built: Sep 27 2017 15:50:29) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies
[harry@srv-rhsoft:~]$ php -a
Interactive mode enabled
php > var_dump(NAN < 0);
bool(false)
php >
------------------------------------------------------------------------
[2017-10-10 10:15:47] danack@php.net
I'm pretty sure this has been fixed since 7.1.9 and since 7.2.0beta2
https://3v4l.org/Fla0D
You said 'version irrelevant' - did you check up to date versions and are seeing something
different, or did you just assume it affected all versions?
------------------------------------------------------------------------
[2017-10-10 10:09:58] fdivitto at gmail dot com
Description:
------------
Why this?
var_dump(NAN < 0);
--> produces "bool(true)"
...while...
$x=NAN;
var_dump($x < 0);
--> produces "bool(false)"
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=75349&edit=1