3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $posts = array("pt", "r", "bp"); $postsnew = array_slice($posts, 0, 3); print_r(array_slice($posts, 0, 3)); ?>
based on ZXW7K
Output for 5.5.0 - 7.3.0beta1
Array ( [0] => pt [1] => r [2] => bp )