3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php var_dump(array_slice(array(1,2,3,4,5), "2")); var_dump(array_slice(array(1,2,3,4,5), "string"));
Output for hhvm-3.12.0, 7.0.0 - 7.1.0
array(3) { [0]=> int(3) [1]=> int(4) [2]=> int(5) } Warning: array_slice() expects parameter 2 to be integer, string given in /in/V4jb2 on line 5 NULL
Output for hhvm-3.10.0

Process exited with code 153.
Output for 5.2.6 - 5.6.28
array(3) { [0]=> int(3) [1]=> int(4) [2]=> int(5) } Warning: array_slice() expects parameter 2 to be long, string given in /in/V4jb2 on line 5 NULL
Output for 4.3.0 - 5.2.5
array(3) { [0]=> int(3) [1]=> int(4) [2]=> int(5) } array(5) { [0]=> int(1) [1]=> int(2) [2]=> int(3) [3]=> int(4) [4]=> int(5) }