RC5 hexdec not compatible

From: Date: Tue, 04 Dec 2001 14:01:02 +0000
Subject: RC5 hexdec not compatible
Groups: php.dev 
Request: Send a blank email to php-dev+get-72448@lists.php.net to get a copy of this message
<?php /* hexdec.php */ /* 4.1.0 branch hexdec not compatible * with earlier PHP releases. */ /* % php4.0.0 -f hexdec.php lemon => 5d08374e => 1560819534 pineapple => a7e9b7d0 => -1477855280 fruit => c10d50e3 => -1056091933 sausage => 42d08254 => 1120961108 breakfast => f7d7b86e => -136857490 coconut => 1138ca81 => 288934529 % php4.0.6 -f hexdec.php lemon => 5d08374e => 1560819534 pineapple => a7e9b7d0 => -1477855280 fruit => c10d50e3 => -1056091933 sausage => 42d08254 => 1120961108 breakfast => f7d7b86e => -136857490 coconut => 1138ca81 => 288934529 % php4.1.0RC5 -f hexdec.php lemon => 5d08374e => 1560819534 pineapple => a7e9b7d0 => 2817112016 fruit => c10d50e3 => 3238875363 sausage => 42d08254 => 1120961108 breakfast => f7d7b86e => 4158109806 coconut => 1138ca81 => 288934529 */ $wordlist = array("lemon", "pineapple", "fruit", "sausage", "breakfast","coconut"); foreach($wordlist as $word) { $crc = mhash(MHASH_CRC32, $word); $hex = bin2hex($crc); $dec = hexdec($hex); echo $word . " => " . $hex . " => " . $dec . "\n"; } ?>

« previous php.dev (#72448) next »