I have a binary file which only has 4 bytes "FFFFFFEE". I just want to put it in a variable equaling 4294967278.
How I've failed so far:
<?
$foo= bin2hex(file_get_contents('testplz.bin'));
// This correctly creates the hex number but on closer inspection it just turned it into a string.
$foo=intval(bin2hex(file_get_contents('testplz.bin')),16);
// This works up until the value exceeds 2147483647, there's a function called floatval but it doesn't accept the ,16 argument and doesn't accept binary either
settype($foo, "float");
// Any variation of bin2hex, casting, etc don't seem to give me a correct answer
echo (float)bin2hex(file_get_contents('testplz.bin'));
?>
Please help ='/, I can't proceed with what I need to finish.