Closed meszaros-lajos-gyorgy closed 3 years ago
The internally used array_slice has this feature and seems to work correctly:
array_slice
<?php $data = [1, 2, 3, 4, 5]; echo '<pre>'; print_r(array_slice($data, 0, -2));
http://phptester.net/ displays the following as output for php 7.0 and above:
Array ( [0] => 1 [1] => 2 [2] => 3 )
The internally used
array_slice
has this feature and seems to work correctly:http://phptester.net/ displays the following as output for php 7.0 and above: