note 31142 deleted from function.pack by alindeman

From: Date: Fri, 11 Apr 2003 00:45:25 +0000
Subject: note 31142 deleted from function.pack by alindeman
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-46477@lists.php.net to get a copy of this message
(Assuming Intel endian) $hex = 0xFEEDFACE; echo $hex."\n"; Displays 4277009102 - as expected echo join("", unpack("N", pack("N", $hex)))."\n"; Prints -17958194; internally converted to float. One would expect 4277009102 here as well echo bindec(decbin(join("", unpack("N", pack("N", $hex)))))."\n"; Workaround: wrap bindec(decbin()) around it, then you get 4277009102 again. I would sure love to get some developers to comment on this behaviour.

« previous php.notes (#46477) next »