note 15547 added to function.bindec
| From: | da_he4datthe-gurusdotde at php2 dot chek dot com | Date: | Sun, 16 Sep 2001 23:11:36 +0000 |
| Subject: | note 15547 added to function.bindec | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-18069@lists.php.net to get a copy of this message | ||
i was quite confused while werking with those bindec()/decbin() functions..
while
echo decbin(bindec(1));
echo decbin(bindec(10));
echo decbin(bindec(101));
just worked like expected,
echo decbin(bindec(010));
returns just 0
and for any reason
echo decbin(bindec(010010010));
returns 101000
i dont think this is a bug (maybe theres some special reason 4 this?), but it took a certain time
till i noticed that
echo decbin(bindec("010010010"));
works fine ...
hope this helps ne1.
http://www.php.net/manual/en/function.bindec.php