3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $arr = ['a', 'b', 'c', 'd']; array_splice($arr, 'b'); var_dump($arr);
Output for 7.0.0 - 7.2.0
Warning: array_splice() expects parameter 2 to be integer, string given in /in/oXrE6 on line 4 array(4) { [0]=> string(1) "a" [1]=> string(1) "b" [2]=> string(1) "c" [3]=> string(1) "d" }
Output for 5.4.0 - 5.6.21
Warning: array_splice() expects parameter 2 to be long, string given in /in/oXrE6 on line 4 array(4) { [0]=> string(1) "a" [1]=> string(1) "b" [2]=> string(1) "c" [3]=> string(1) "d" }
Output for 5.3.19 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/oXrE6 on line 3
Process exited with code 255.