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; ?>

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
7.2.90.0840.01314.20
7.2.80.0770.01014.52
7.2.70.0790.00714.29
7.2.60.0750.00914.72
7.2.50.0920.00314.52
7.2.40.0810.01614.51
7.2.30.1250.01014.62
7.2.20.1370.01014.54
7.2.10.0950.00614.80
7.2.00.0080.01114.80
7.1.210.0770.01013.64
7.1.200.0640.01013.36
7.1.190.1090.00713.38
7.1.180.0830.01013.59
7.1.170.1010.00313.57
7.1.160.1020.00013.61
7.1.150.1190.01313.54
7.1.140.1920.01313.50
7.1.130.1420.01013.48
7.1.120.0160.00313.60
7.1.110.0970.00613.70
7.1.100.1270.00313.90
7.1.90.1860.01013.41
7.1.80.2080.00313.71
7.1.70.1690.01013.56
7.1.60.1610.01031.79
7.1.50.3280.00731.34
7.1.40.1760.00631.77
7.1.30.2560.00731.89
7.1.20.1870.01331.61
7.1.10.2430.00313.63
7.1.00.1660.01013.65
7.0.310.1200.00713.32
7.0.300.1150.01013.10
7.0.290.1800.00713.49
7.0.280.1100.00313.15
7.0.270.0120.00513.21
7.0.260.0120.00613.10
7.0.250.1050.00713.30
7.0.240.1400.00313.34
7.0.230.2190.00713.27
7.0.220.2200.00313.11
7.0.210.1880.01013.39
7.0.200.3360.00313.16
7.0.190.2260.00713.26
7.0.180.1710.00313.34
7.0.170.3280.00313.52
7.0.160.2920.00013.30
7.0.150.2520.00313.05
7.0.140.1690.00313.06
7.0.130.1430.00713.23
7.0.120.1270.00713.09
7.0.110.1540.00713.40
7.0.100.1550.00713.26
7.0.90.1290.01513.28
7.0.80.1460.00313.34
7.0.70.1430.01013.30
7.0.60.1480.01313.41
7.0.50.1990.00713.17
7.0.40.1310.00313.28
7.0.30.1190.01013.13
7.0.20.2490.00313.13
7.0.10.1400.00712.84
7.0.00.1190.00313.23

preferences:
141.6 ms | 1446 KiB | 7 Q