3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $binarydata = "\x32\x42\x00\xa0"; $array = unpack("c2/n", $binarydata); var_dump($array); / / $packed = "hoge\0\0" var_dump($packed = pack('a6', '')); // PHP 5.4 $data = "hoge" // PHP 5.5 $data = "hoge\0\0" var_dump($data = unpack('a6', $packed)); // PHP 5.5 $data = "hoge" var_dump($data = unpack('Z6', $packed));
based on kFpBU
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.4.32
Parse error: syntax error, unexpected '/' in /in/DA2mE on line 6
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1, 5.0.0 - 5.0.5
Parse error: parse error, unexpected '/' in /in/DA2mE on line 6
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/DA2mE on line 6
Process exited with code 255.