note 26417 deleted from function.bindec by danielc

From: Date: Tue, 14 Apr 2009 23:29:47 +0000
Subject: note 26417 deleted from function.bindec by danielc
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-153226@lists.php.net to get a copy of this message
Note Submitter: juancri at tagnet dot org Reason: 0 ---- > 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 =)

« previous php.notes (#153226) next »