Don't forget to decode user-defined-pseudo-byte-sequences before unpacking...
<?php
$byte_code_string = '00004040';
var_dump ( unpack ( 'f', $byte_code_string ) );
?>
Result:
array(1) {
[1]=>
float(6.4096905560973E-10)
}
whereas
<?php
$byte_code_string = '00004040';
var_dump ( unpack ( 'f', hex2bin ( $byte_code_string ) ) );
?>
Result:
array(1) {
[1]=>
float(3)
}