3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $intput = [1,2,3]; print_r(["smazat"=>array_splice($intput, 0)]); print_r(["nechat"=>$intput]);
based on JH2dN
Output for 5.4.1 - 7.2.0
Array ( [smazat] => Array ( [0] => 1 [1] => 2 [2] => 3 ) ) Array ( [nechat] => Array ( ) )
Output for 5.3.18 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/XDAMO on line 2
Process exited with code 255.