3v4l.org

run code in 300+ PHP versions simultaneously
<?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(trim($values), '[]')); $result = eval($result . ';'); $tests[] = [$values, $result]; } print_r($tests);
Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
Fatal error: Uncaught Error: Undefined constant "T" in /in/IIbhB(17) : eval()'d code:2 Stack trace: #0 /in/IIbhB(17): eval() #1 {main} thrown in /in/IIbhB(17) : eval()'d code on line 2
Process exited with code 255.
Output for 7.2.0 - 7.2.33, 7.3.0 - 7.3.31, 7.4.0 - 7.4.33
Warning: Use of undefined constant T - assumed 'T' (this will throw an Error in a future version of PHP) in /in/IIbhB(17) : eval()'d code on line 2 Notice: Undefined index: T in /in/IIbhB(17) : eval()'d code on line 2 Warning: Use of undefined constant T - assumed 'T' (this will throw an Error in a future version of PHP) in /in/IIbhB(17) : eval()'d code on line 2 Notice: Undefined index: T in /in/IIbhB(17) : eval()'d code on line 2 Warning: Use of undefined constant T - assumed 'T' (this will throw an Error in a future version of PHP) in /in/IIbhB(17) : eval()'d code on line 2 Notice: Undefined index: T in /in/IIbhB(17) : eval()'d code on line 2 Warning: Use of undefined constant T - assumed 'T' (this will throw an Error in a future version of PHP) in /in/IIbhB(17) : eval()'d code on line 2 Notice: Undefined index: T in /in/IIbhB(17) : eval()'d code on line 2 Warning: Use of undefined constant T - assumed 'T' (this will throw an Error in a future version of PHP) in /in/IIbhB(17) : eval()'d code on line 2 Notice: Undefined index: T in /in/IIbhB(17) : eval()'d code on line 2 Warning: Use of undefined constant T - assumed 'T' (this will throw an Error in a future version of PHP) in /in/IIbhB(17) : eval()'d code on line 2 Notice: Undefined index: T in /in/IIbhB(17) : eval()'d code on line 2 Warning: Use of undefined constant T - assumed 'T' (this will throw an Error in a future version of PHP) in /in/IIbhB(17) : eval()'d code on line 2 Notice: Undefined index: T in /in/IIbhB(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 7.3.32 - 7.3.33
Warning: Use of undefined constant T - assumed 'T' (this will throw an Error in a future version of PHP) in /in/IIbhB(17) : eval()'d code on line 2 Warning: Use of undefined constant T - assumed 'T' (this will throw an Error in a future version of PHP) in /in/IIbhB(17) : eval()'d code on line 2 Warning: Use of undefined constant T - assumed 'T' (this will throw an Error in a future version of PHP) in /in/IIbhB(17) : eval()'d code on line 2 Warning: Use of undefined constant T - assumed 'T' (this will throw an Error in a future version of PHP) in /in/IIbhB(17) : eval()'d code on line 2 Warning: Use of undefined constant T - assumed 'T' (this will throw an Error in a future version of PHP) in /in/IIbhB(17) : eval()'d code on line 2 Warning: Use of undefined constant T - assumed 'T' (this will throw an Error in a future version of PHP) in /in/IIbhB(17) : eval()'d code on line 2 Warning: Use of undefined constant T - assumed 'T' (this will throw an Error in a future version of PHP) in /in/IIbhB(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.5.24 - 5.5.35, 5.6.8 - 5.6.28, 7.0.0 - 7.0.20, 7.1.0 - 7.1.33
Notice: Use of undefined constant T - assumed 'T' in /in/IIbhB(17) : eval()'d code on line 2 Notice: Undefined index: T in /in/IIbhB(17) : eval()'d code on line 2 Notice: Use of undefined constant T - assumed 'T' in /in/IIbhB(17) : eval()'d code on line 2 Notice: Undefined index: T in /in/IIbhB(17) : eval()'d code on line 2 Notice: Use of undefined constant T - assumed 'T' in /in/IIbhB(17) : eval()'d code on line 2 Notice: Undefined index: T in /in/IIbhB(17) : eval()'d code on line 2 Notice: Use of undefined constant T - assumed 'T' in /in/IIbhB(17) : eval()'d code on line 2 Notice: Undefined index: T in /in/IIbhB(17) : eval()'d code on line 2 Notice: Use of undefined constant T - assumed 'T' in /in/IIbhB(17) : eval()'d code on line 2 Notice: Undefined index: T in /in/IIbhB(17) : eval()'d code on line 2 Notice: Use of undefined constant T - assumed 'T' in /in/IIbhB(17) : eval()'d code on line 2 Notice: Undefined index: T in /in/IIbhB(17) : eval()'d code on line 2 Notice: Use of undefined constant T - assumed 'T' in /in/IIbhB(17) : eval()'d code on line 2 Notice: Undefined index: T in /in/IIbhB(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] => ) )

preferences:
193.35 ms | 410 KiB | 229 Q