3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php eval('$i = (string)1/4;'); var_dump($i);echo (string)1/4; $randStr = []; foreach (array_rand($data, 4) => $k as $v) { //... $randStr[] = substr($data[$k], -2); } echo 'A-AA-[' . implode(' ', $randStr) . ']';
Output for 5.4.0 - 5.4.28
Parse error: syntax error, unexpected '=>' (T_DOUBLE_ARROW) in /in/MaWKn on line 7
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected '[' in /in/MaWKn on line 6
Process exited with code 255.