Parse a string to extract function name and parameter for use with `call_user_func()`
<p>How do I execute the <code>transaction(123)</code> function? </p>

<p>The response via API is: <code>transaction(123)</code></p>

<p>I store this in the <code>$response</code> varible.</p>

<pre><code>&lt;?php

function transaction($orderid) {
  return  $orderid;
}

//api response
$response = "transaction(123)";

try {
  $orderid = call_user_func($response);
  echo  $orderid;
} catch (Exception $e) {
    echo 'Caught exception: ',  $e-&gt;getMessage(), "\n";
}

?&gt;
</code></pre>
