3v4l.org

run code in 300+ PHP versions simultaneously
<?php function findBELA() { $result = []; $now = time(); $fmago = $now-900; $url = 'https://poloniex.com/public?command=returnChartData&currencyPair=BTC_BELA&start='.$fmago.'&end='.$now.'&period=300; $json_data = file_get_contents($url); $array_data = json_decode($json_data, true); foreach ($array_data as $currncy_option => $value) { $result[$currncy_option] = $value["high"]; $keys = array_values($result); $key = @($keys[0]/$keys[1]-1)*100; } return number_format($key,2) ; } $onbes=findBELA(); print $onbes; ?>
Output for 7.0.0 - 7.0.31, 7.1.0 - 7.1.21, 7.2.0 - 7.2.9
Parse error: syntax error, unexpected ''&period=300;' (T_ENCAPSED_AND_WHITESPACE) in /in/ucu3i on line 8
Process exited with code 255.

preferences:
147.31 ms | 1457 KiB | 7 Q