3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $packagesTemp = array(); $packages = ['a', 'b', 'c']; $packagesTemp[1] += $packages[0]; print_r($packagesTemp);
based on aTCXK
Output for 7.1.0 - 7.2.0
Notice: Undefined offset: 1 in /in/KChRG on line 7 Warning: A non-numeric value encountered in /in/KChRG on line 7 Array ( [1] => 0 )
Output for 5.4.10 - 7.0.20
Notice: Undefined offset: 1 in /in/KChRG on line 7 Array ( [1] => 0 )
Output for 5.3.20 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/KChRG on line 5
Process exited with code 255.