fork download
  1. <?php
  2.  
  3. $string = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h'];
  4.  
  5. function myFunc(){
  6. }
  7.  
  8. call_user_func_array('myFunc', array_slice($string, 0, 6));
Success #stdin #stdout 0.01s 20520KB
stdin
Standard input is empty
stdout
Array
(
    [0] => a
    [1] => b
    [2] => c
    [3] => d
    [4] => e
    [5] => f
)