title: Exponential Moving Average in php
body: <p>I want to calculate the EMA (Exponential Moving Average) value in PHP.</p>
  
  <p>I've tried with following code but it's giving me 500 error.</p>
  
  <pre><code>$real = array(12,15,17,19,21,25,28,12,15,16);
  $timePeriod = 3;
  $data = trader_ema($real,$timePeriod);
  var_dump($data);
  </code></pre>
  
  <p>PHP: EMA calculation function <a href="http://php.net/manual/en/function.trader-ema.php" rel="nofollow">trader-ema</a></p>
  
  <p>Tried with long time Googling but not getting any help on this in PHP. So, I've no clue what needs to be done to calculate the EMA value.</p>
  
  <p><strong>Edit-1: Installed extensions</strong></p>
  
  <p>I've installed all the necessary extensions, Now I am getting the output.
  But it doesn't seems giving proper output.</p>
  
  <p>I think PHP function for calculating EMA is not working properly.
  Any help in this would be greatly appreciated.</p>