3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function dc09crc($data) { function calc_crc($crc, $debyte) { $deze = ord($debyte); foreach (range(0, 7) as $i) { $deze ^= $crc & 1; $crc >>= 1; if ($deze & 1) { $crc ^= 0xa001; } $deze >>= 1; } return $crc; } $crc = 0; foreach (range(0, strlen($data)-1) as $j) { $crc = calc_crc($crc, $data[$j]); } return $crc; } $response = '7CFD0011"ACK"0001#00411[]'; $t = explode('"', $response); $payload = ""; foreach(range(1, sizeof($t)-1) as $e) { echo $; } //if ($tokens[0] != dc89crc()
Output for 7.3.0rc3
Parse error: syntax error, unexpected ';', expecting variable (T_VARIABLE) or '{' or '$' in /in/LFUS5 on line 28
Process exited with code 255.