3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $a = array(1,2,3,4,5,6); $b = array_slice($a,2,-2); $c = '123456'; $d = substr($c,2,-2); print_r($b); echo $d;
Output for 4.3.0 - 7.1.0
Array ( [0] => 3 [1] => 4 ) 34