3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $test = [ ['first', 'value'], ['second', 'value'], ]; foreach ($test as $index => [$a, $b]) { echo "$a - $b"; }
based on hTT2d
Output for 7.1.0 - 7.3.0rc3
first - valuesecond - value
Output for 7.0.28
Parse error: syntax error, unexpected ')', expecting :: (T_PAAMAYIM_NEKUDOTAYIM) in /in/XvpNl on line 8
Process exited with code 255.
Output for 5.6.38
Parse error: syntax error, unexpected '[' in /in/XvpNl on line 8
Process exited with code 255.