3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $texts = array('a', 'b', 'c', 'd', 'e', 'f', 'g'); $whatever = array_slice($texts, -3, 3, true); print_r($whatever);
Output for 5.0.2 - 7.1.0
Array ( [4] => e [5] => f [6] => g )
Output for 4.3.0 - 5.0.1
Warning: Wrong parameter count for array_slice() in /in/PQtrL on line 4