Bug #75349 [Com]: NAN comparison
| From: | spam2 at rhsoft dot net | Date: | Tue, 10 Oct 2017 10:20:49 +0000 |
| Subject: | Bug #75349 [Com]: NAN comparison | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-211603@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
Comment by: spam2 at rhsoft dot net
Reported by: fdivitto at gmail dot com
Summary: NAN comparison
Status: Feedback
Type: Bug
Package: Scripting Engine problem
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
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 >
Previous Comments:
------------------------------------------------------------------------
[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