3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = array('key', 'value', 'key2'; $iterations = count($arr); $result = array(); for ($i = 0; $i < $iterations; $i += 2) $result[$arr[$i]] = isset($arr[$i + 1]) ? $arr[$i + 1] : null; var_dump($result);
Output for 5.3.0 - 5.3.27, 5.4.0 - 5.4.19
Parse error: syntax error, unexpected ';', expecting ')' in /in/9thG9 on line 3
Process exited with code 255.

preferences:
176.61 ms | 1395 KiB | 55 Q