3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?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 5.6.30, 7.0.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.
Output for hhvm-3.22.0
Fatal error: Uncaught Error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE in /in/ucu3i:-1 Stack trace: #0 {main}
Process exited with code 255.
Output for hhvm-3.18.4 - 3.21.3
Fatal error: Uncaught Error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE in /in/ucu3i:8 Stack trace: #0 {main}
Process exited with code 255.