base_convert bug?
| From: | Radek Krejča | Date: | Mon, 28 Jul 2014 09:43:29 +0000 |
| Subject: | base_convert bug? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-323669@lists.php.net to get a copy of this message | ||
Hello,
function base convert from base(16) to base(2) returns wrong value whenever the binary string starts
with zeros
it eliminates all 0s in the left of the string until first (1)
example :
base_convert("10",16,2);
//return value 10000
//correct value 00010000
Is it bug? Thank you.
Radek