3v4l.org

run code in 300+ PHP versions simultaneously
<?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.0 - 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.3.25 - 5.3.26
Parse error: syntax error, unexpected '[' in /in/m67Ac 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.

preferences:
176.75 ms | 1395 KiB | 51 Q