3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = array( 'string' => 'my string', 'empty string' => '', 'number' => 5, 'zero' => 0, 'null' => null, 'array' => array(1, 2, 3), 'empty_array' => array(), ); foreach ($arr as $key => $value) { echo $key, ' is ', (isset($arr[$key] ? 'set' : 'not set'); }
Output for 5.3.0 - 5.3.28, 5.4.0 - 5.4.29
Parse error: syntax error, unexpected '?', expecting ',' or ')' in /in/9abvL on line 14
Process exited with code 255.

preferences:
183.56 ms | 1395 KiB | 66 Q