How to determine user defined function parameters names before calling it?
<p>In PHP, I have created a user defined function. Example:</p>

<pre><code>&lt;?php
function test($one, $two) {
    // do things
}
?&gt;
</code></pre>

<p>I would like to find the names of the function parameters. How would I go about doing this?</p>

<p>This is an example of what I would like:</p>

<pre><code>&lt;?php
function test($one, $two) {
    // do things
}

$params = magic_parameter_finding_function('test');
print_r($params);
?&gt;
</code></pre>

<p>This would output:</p>

<pre><code>Array
(
    [0] =&gt; one
    [1] =&gt; two
)
</code></pre>

<p>Also this is very important that I am able to get the user defined function parameter names outside the scope of the function. Thanks in advance!</p>
