|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2020-09-05 06:51 UTC] tsxgt at 163 dot com
-Status: Open
+Status: Closed
[2020-09-05 06:51 UTC] tsxgt at 163 dot com
[2020-09-05 09:33 UTC] cmb@php.net
-Status: Closed
+Status: Not a bug
-Assigned To:
+Assigned To: cmb
[2020-09-05 09:33 UTC] cmb@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Dec 07 16:00:01 2025 UTC |
Description: ------------ Windows system, run a php file with chinese character in PHP CLI mode, it return s unexpected value PHP 5.6.40 is ok PHP 7.0.33 is ok PHP >= 7.1.33 is bad Test script: --------------- <?php while (1) { $s = fgets(STDIN); echo var_dump($s); echo bin2hex($s); echo "\r\n"; } Expected result: ---------------- aaa string(5) "aaa " 6161610d0a 你好 string(6) "你好 " c4e3bac30d0a Actual result: -------------- aaa string(5) "aaa " 6161610d0a 你好 string(4) "\000\000 " 00000d0a