|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2013-07-06 17:42 UTC] iam4webwork at hotmail dot com
[2020-12-07 12:09 UTC] cmb@php.net
-Status: Open
+Status: Not a bug
-Assigned To:
+Assigned To: cmb
[2020-12-07 12:09 UTC] cmb@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 00:00:02 2025 UTC |
Description: ------------ If you pass to base_convert a numeric string like "0.5", to have it converted from base 10 to base 16, PHP will interpret the input as decimal 5 and return hexadecimal 5. I suspect that the problem lies internally in the logic of _php_math_basetozval. Test script: --------------- var_dump(base_convert("0.5",10,16)); Expected result: ---------------- I expected PHP to return a zero just as printf("%x","0.5") and dexhex() do. Actual result: -------------- 5