3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $str = <<<END [F] = [] [T] = [[0,0]] [T,T,F,T] = [[0,1],[3,3]] [F,T,T,F,F,T,T,T] = [[1,2],[5,7]] [F,T,T,F,F,F,T,T,T,T] = [[1,2],[6,9]] [T,T,F,F,F,T,T,T,T,T,T,T,T,T,T,F] = [[0,1],[5,14]] [F,F,T,T,F,F,F,F,F,F,F,F,T,T,T,T,T,T,T,T,F,F,F,F,F,F,F,F,F,F,F,F,F,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,T,T] = [[2,3],[12,19],[33,54],[93,94]] END; $tests = []; foreach(explode("\n", $str) as $line) { list($values, $result) = explode('=', $str); $values = explode(',', trim($values, '[]')); $result = eval($result); $tests[] = [$values, $result]; } print_r($tests);
Output for 7.0.0 - 7.2.0
Parse error: syntax error, unexpected end of file in /in/dmIEj(17) : eval()'d code on line 2
Process exited with code 255.
Output for 5.5.24 - 5.6.28
Parse error: syntax error, unexpected end of file in /in/dmIEj(17) : eval()'d code on line 2 Parse error: syntax error, unexpected end of file in /in/dmIEj(17) : eval()'d code on line 2 Parse error: syntax error, unexpected end of file in /in/dmIEj(17) : eval()'d code on line 2 Parse error: syntax error, unexpected end of file in /in/dmIEj(17) : eval()'d code on line 2 Parse error: syntax error, unexpected end of file in /in/dmIEj(17) : eval()'d code on line 2 Parse error: syntax error, unexpected end of file in /in/dmIEj(17) : eval()'d code on line 2 Parse error: syntax error, unexpected end of file in /in/dmIEj(17) : eval()'d code on line 2 Array ( [0] => Array ( [0] => Array ( [0] => F] ) [1] => ) [1] => Array ( [0] => Array ( [0] => F] ) [1] => ) [2] => Array ( [0] => Array ( [0] => F] ) [1] => ) [3] => Array ( [0] => Array ( [0] => F] ) [1] => ) [4] => Array ( [0] => Array ( [0] => F] ) [1] => ) [5] => Array ( [0] => Array ( [0] => F] ) [1] => ) [6] => Array ( [0] => Array ( [0] => F] ) [1] => ) )
Output for 5.4.11 - 5.4.45
Parse error: syntax error, unexpected '[' in /in/dmIEj(17) : eval()'d code on line 2 Parse error: syntax error, unexpected '[' in /in/dmIEj(17) : eval()'d code on line 2 Parse error: syntax error, unexpected '[' in /in/dmIEj(17) : eval()'d code on line 2 Parse error: syntax error, unexpected '[' in /in/dmIEj(17) : eval()'d code on line 2 Parse error: syntax error, unexpected '[' in /in/dmIEj(17) : eval()'d code on line 2 Parse error: syntax error, unexpected '[' in /in/dmIEj(17) : eval()'d code on line 2 Parse error: syntax error, unexpected '[' in /in/dmIEj(17) : eval()'d code on line 2 Array ( [0] => Array ( [0] => Array ( [0] => F] ) [1] => ) [1] => Array ( [0] => Array ( [0] => F] ) [1] => ) [2] => Array ( [0] => Array ( [0] => F] ) [1] => ) [3] => Array ( [0] => Array ( [0] => F] ) [1] => ) [4] => Array ( [0] => Array ( [0] => F] ) [1] => ) [5] => Array ( [0] => Array ( [0] => F] ) [1] => ) [6] => Array ( [0] => Array ( [0] => F] ) [1] => ) )
Output for 5.3.21 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/dmIEj on line 13
Process exited with code 255.