|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2018-12-31 12:58 UTC] nikic@php.net
-Status: Open
+Status: Not a bug
[2018-12-31 12:58 UTC] nikic@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 09:00:01 2025 UTC |
Description: ------------ I tested this code with different versions of php 5.6, 7.1 and 7.2 and it's the same with all. PHP 7.2.13 (cli) (built: Dec 5 2018 07:19:53) ( NTS MSVC15 (Visual C++ 2017) x64 ) Copyright (c) 1997-2018 The PHP Group Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies PHP 7.2.6 (cli) (built: May 23 2018 20:29:37) ( NTS MSVC15 (Visual C++ 2017) x64 ) Copyright (c) 1997-2018 The PHP Group Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies with Xdebug v2.6.0, Copyright (c) 2002-2018, by Derick Rethans PHP 5.6.36 (cli) (built: Apr 25 2018 16:45:32) Copyright (c) 1997-2016 The PHP Group Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies PHP 7.1.18 (cli) (built: May 24 2018 17:54:03) ( NTS MSVC14 (Visual C++ 2015) x64 ) Copyright (c) 1997-2018 The PHP Group Zend Engine v3.1.0, Copyright (c) 1998-2018 Zend Technologies with Xdebug v2.6.0, Copyright (c) 2002-2018, by Derick Rethans Test script: --------------- function printBytes($bytes) { foreach (str_split($bytes) as $b) printf('%02x ', ord($b)); echo "\n"; } printBytes(pack('d', (double)NAN)); printBytes(pack('f', (float)NAN)); Expected result: ---------------- 00 00 00 00 00 00 f8 7f 00 00 c0 7f Actual result: -------------- 00 00 00 00 00 00 f8 ff 00 00 c0 ff