fork(2) download
  1. <?php
  2.  
  3. $array = array('nome'=>'Ribossomo', 'snome'=> 'Silva', 'idade'=> 500);
  4. print_r(array_slice($array, 0, 2, true));
Success #stdin #stdout 0.02s 52472KB
stdin
Standard input is empty
stdout
Array
(
    [nome] => Ribossomo
    [snome] => Silva
)