3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $data = []; $size_data = 0; $range = 1; $i = 0; $k = 2/($range+1); for ($i; $i<$size_data; ++$i) { $lastEMA = $lastEMA + $k * ($data[$i]-$lastEMA); } $div = $range + 1; for ($i = 0; $i != $size_data; ++$i) { $lastEMA += (($data[$i] - $lastEMA) << 1) / $div; }
Output for 5.4.0 - 7.1.0
Output for 5.3.7 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/J0SmI on line 3
Process exited with code 255.