title: PHP - Need to calculate the string formula to integer value
body: <p>I need to convert the formula like string to its calculated value, in PHP.</p>
  
  <p>For eg:</p>
  
  <pre><code>$str = "(20000+(2000*(40/100)))*(10/100)";
  $calculated_value = ????; // Calculated value of the above string "$str".
  </code></pre>
  
  <p>I need to calculate value of the string "$str" and store it in separate string.
  Please help me out.</p>
  
  <p>Thanks in advance.</p>