3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php list($x[], $x[], $x[], $x[1]) = ['azul', 'amarelo', 'vermelho', 'verde']; echo $x[0].'-'.$x[1].'-'.$x[2];
based on 7CcZJ
Output for 7.0.0 - 7.2.0
azul-verde-vermelho
Output for 5.4.0 - 5.6.28
Notice: Undefined offset: 0 in /in/Lftae on line 4 -verde-vermelho
Output for 5.3.19 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/Lftae on line 3
Process exited with code 255.