Bug #61740 [Opn->Ver]: base_convert skips over out-of-range or unknown characters
| From: | cmb@php.net | Date: | Thu, 30 Jun 2016 11:35:47 +0000 |
| Subject: | Bug #61740 [Opn->Ver]: base_convert skips over out-of-range or unknown characters | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-201935@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=61740&edit=1
ID: 61740
Updated by: cmb@php.net
Reported by: hholzgra@php.net
Summary: base_convert skips over out-of-range or unknown
characters
-Status: Open
+Status: Verified
Type: Bug
Package: Math related
Operating System: linux
PHP Version: master-Git-2012-04-15 (Git)
Block user comment: N
Private report: N
New Comment:
Confirmed: <https://3v4l.org/kqOBk>. Apparently, *any*
invalid
characters in $number are silently ignored.
Previous Comments:
------------------------------------------------------------------------
[2012-04-15 21:44:29] hholzgra@php.net
Description:
------------
e.g. base_convert(101,10,10) and base_convert(10.1,10,10) return the same result as the decimal dot
character is simply ignored/skipped over
(found in the user notes on base_convert() in the manual)
Test script:
---------------
echo base_convert("10@23",10,10);
Expected result:
----------------
10 // or an error
Actual result:
--------------
1023
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=61740&edit=1