RE: [PHP] base_convert bug?

From: Date: Mon, 28 Jul 2014 11:51:33 +0000
Subject: RE: [PHP] base_convert bug?
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-323672@lists.php.net to get a copy of this message
> That's not a bug, they're both the same number. Leading zeros are > always ignored in number systems, and PHP doesn't attempt to format it > assuming and specific word size. Try the same conversion in your > computers calculator. > > To format the number as you wish for output, use printf or sprintf to > pad with leading zeros. [Radek Krejca] Thank you for response, but maybe it is not important when we talk about Decimal numbers , but with binary i think it is important to keep zeros ,because the position of bit in the string is very important , to construct its value , or in Decoding ,Encoding process , it will be also very important . Thank you Radek

« previous php.general (#323672) next »