note 26417 added to function.bindec

From: Date: Wed, 30 Oct 2002 10:16:34 +0000
Subject: note 26417 added to function.bindec
Groups: php.notes 
Request: Send a blank email to php-notes+get-38740@lists.php.net to get a copy of this message
> The special reason 4 this is: > (010) is an integer, left 0 is null, eg 010 = 10 > ('010') is a string, eg '010' = '010' In binary, just like with decimals, the left 0's are nulls. in Decimal: 010 = 10 in Binary: 010 = 10 too :o) > echo decbin(bindec(010010010)); > returns 101000 010010010 is a octal number. It's eq. to 2101256 (decimal). decbin(bindec(010010010)) is 101000 because 010010010 = 2101256. That's all =) -- http://www.php.net/manual/en/function.bindec.php http://master.php.net/manage/user-notes.php?action=edit+26417 http://master.php.net/manage/user-notes.php?action=delete+26417 http://master.php.net/manage/user-notes.php?action=reject+26417

« previous php.notes (#38740) next »