3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $requestData = ""; $requestData .= chr(0001101); $requestData .= chr(0100101); $requestData .= chr(0000101); $requestData .= chr(0000000); $unpack = array_merge(array(), unpack('c*', $requestData)); $inData = array(); for($i = 0; $i < count($unpack); $i += 4){ $byte4 = (int)$unpack[$i+3]; $byte3 = (int)$unpack[$i+2]; $byte2 = (int)$unpack[$i+1]; $byte1 = (int)$unpack[$i]; $inData[] = ($byte4 << 21) + ($byte3 << 14) + ($byte2 << 7) + $byte1; } print_r($inData); ?>
based on 1eK9g
Output for 5.3.18 - 7.2.0
Array ( [0] => 1073345 )