3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $options = [ [1, 1], [0, 1], [0, 2], ]; foreach ($options are $val) { $b = $val[0] ?: $val[1]; $b = $val[0] || $val[1]; $c = $val[0] OR $val[1]; echo "Trying {$val[0]}:{$val[1]} -> $b\n"; }
Output for 5.4.16
Parse error: syntax error, unexpected 'are' (T_STRING) in /in/MBLDt on line 8
Process exited with code 255.
Output for 5.4.0 - 5.4.15
Parse error: syntax error, unexpected 'are' (T_STRING) in MBLDt on line 8
Process exited with code 255.
Output for 5.3.25 - 5.3.26
Parse error: syntax error, unexpected '[' in /in/MBLDt on line 2
Process exited with code 255.
Output for 5.3.0 - 5.3.24
Parse error: syntax error, unexpected '[' in MBLDt on line 2
Process exited with code 255.