3v4l.org

run code in 300+ PHP versions simultaneously
<?php $XML=simplexml_load_file("http://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml"); //the file is updated daily between 8:15AM and 9AM EDT $usd = 0; $currencyCodes = array(); $result = 0; foreach($XML->Cube->Cube->Cube as $rate){ if($rate["currency"] == "USD"){ $usd = $rate["rate"]; } $currencyCodes[] = $rate; } foreach($currencyCodes as $rate){ echo = sprintf("INSERT INTO `interdesign`.`currency_conversion` (`code`, `per_eur`, `per_usd`) VALUES ('%s', '%s', '%s');<br>", $rate["currency"], $rate["rate"], $usd ? $rate["rate"]/$usd : NULL); $result += DBRef::idb()->exec($qry); }

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)
5.4.290.0120.04912.48
5.4.280.0140.09012.38
5.4.270.0140.04712.38
5.4.260.0100.06512.38
5.4.250.0070.04212.38
5.4.240.0060.04012.38
5.4.230.0050.04412.37
5.4.220.0060.04512.37
5.4.210.0100.05012.37
5.4.200.0080.05412.38
5.4.190.0140.04212.37
5.4.180.0110.04412.37
5.4.170.0070.07112.37
5.4.160.0120.06612.37
5.4.150.0060.05112.37
5.4.140.0050.07712.06
5.4.130.0140.06712.04
5.4.120.0100.06212.00
5.4.110.0110.05912.00
5.4.100.0170.05212.00
5.4.90.0170.08912.00
5.4.80.0120.05112.00
5.4.70.0100.05111.99
5.4.60.0100.04612.00
5.4.50.0100.07812.00
5.4.40.0100.04911.98
5.4.30.0130.05211.98
5.4.20.0120.08211.98
5.4.10.0090.04611.98
5.4.00.0060.05911.47
5.3.280.0070.06212.71
5.3.270.0190.09712.72
5.3.260.0120.05812.71
5.3.250.0100.03912.72
5.3.240.0070.04012.72
5.3.230.0040.04112.71
5.3.220.0080.03712.68
5.3.210.0090.04312.68
5.3.200.0050.03812.68
5.3.190.0090.04812.67
5.3.180.0070.06112.68
5.3.170.0110.04512.67
5.3.160.0050.04312.68
5.3.150.0080.03812.67
5.3.140.0110.05312.66
5.3.130.0070.04912.66
5.3.120.0080.07512.66
5.3.110.0140.07112.66
5.3.100.0070.05012.12
5.3.90.0070.04612.09
5.3.80.0150.04712.08
5.3.70.0060.05212.08
5.3.60.0180.05112.07
5.3.50.0060.05212.00
5.3.40.0060.05212.00
5.3.30.0070.04911.95
5.3.20.0100.04611.73
5.3.10.0090.04411.70
5.3.00.0100.04411.68

preferences:
141.06 ms | 1394 KiB | 7 Q