note 97689 deleted from function.hexdec by danbrown

From: Date: Mon, 03 May 2010 14:19:29 +0000
Subject: note 97689 deleted from function.hexdec by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-168884@lists.php.net to get a copy of this message
Note Submitter: jurrrrr at msn dot com ---- way better version of binfromdec() imo.. [code]function dec2bin($num) { for ($i = 0; $i < 32; $i++) { $bit[$i] = ($num >> $i) & 1; } return strrev(implode("", $bit)); }[/code]

« previous php.notes (#168884) next »