note 13868 modified in function.ord.php by jeroen

From: Date: Sun, 08 Jul 2001 20:30:52 +0000
Subject: note 13868 modified in function.ord.php by jeroen
Groups: php.notes 
Request: Send a blank email to php-notes+get-15100@lists.php.net to get a copy of this message
[Ed: bindec() does this for you... it only doesn't get the sign-bit, that's not so hard to fix, see the note over there. http://www.php.net/bindec --jeroen ] Erm this one took me a while to work out, in the end a friend told me, if ur woking out the value of an 32bit interger ($data) then this is 4 u ;-) $num=ord($data[0])+(ord($data[1])<<8)+(ord($data[2])<<16)+(ord($data[3])<<24); if ($num>=4294967294){ $num-=4294967296; } http://www.php.net/manual/function.ord.php.php

« previous php.notes (#15100) next »