well... if you are truly dealing with raw binary data you can use the [man]unpack/man function...this should do things at the binary level and not at the php/string level...
i have a needless write i here just to get at what you were doing... you should be able to see the difference in the two values it prints out
<?php
header('Content-type: text/plain');
$data = pack( 'd', 2.22E2 );
$fp = fopen( './binread.data', 'a+' );
fwrite( $fp, $data );
fclose( $fp );
$fp = fopen( './binread.data', 'r' );
$val = fread( $fp, 8 );
fclose( $fp );
$result = unpack( 'd', $val );
$unpacked = $result[NULL];
$typecast = (double)$val;
echo gettype($unpacked) ." : ". $unpacked ."\n";
echo gettype($typecast) ." : ". $typecast ."\n";
?>