title: PHP - Pass array as variable-length argument list
body: <p>I have really simple problem in my PHP script. There is a function defined which takes <strong>variable length argument list</strong>:</p>
  
  <pre><code>function foo() {
    // func_get_args() and similar stuff here
  }
  </code></pre>
  
  <p>When I call it like this, it works just fine:</p>
  
  <pre><code>foo("hello", "world");
  </code></pre>
  
  <p>However, I have my variables in the array and I need to pass them "separately" as single arguments to the function. For example:</p>
  
  <pre><code>$my_args = array("hello", "world");
  foo(do_some_stuff($my_args));
  </code></pre>
  
  <p>Is there any <strong>do_some_stuff</strong> function which splits the arguments for me so I can pass them to the function? </p>