3v4l.org

run code in 300+ PHP versions simultaneously
<?php $someArray = new Array("key1" => "value1", "key2" => "value2", "key3" => "value3", "key4" => "value4"); $len = count($someArray); $i = 0; foreach($someArray AS $key => $value) { if($i == $len - 1) { echo "This is the last line!"; } else { echo "This is line $i\n"; } $i++; }

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.130.1570.04016.32
5.4.120.1670.03716.27
5.4.110.1530.03316.58
5.4.100.1670.03716.41
5.4.90.1600.04716.58
5.4.80.1930.03016.43
5.4.70.1870.03316.26
5.4.60.1730.04016.38
5.4.50.1770.04716.51
5.4.40.1800.03716.43
5.4.30.1770.04716.21
5.4.20.1500.04316.52
5.4.10.1530.03716.21
5.4.00.1630.03715.86
5.3.230.1570.03014.69
5.3.220.1530.04714.44
5.3.210.1570.03714.66
5.3.200.1500.03714.41
5.3.190.1530.03714.55
5.3.180.1530.03714.55
5.3.170.1500.04014.41
5.3.160.1670.03314.58
5.3.150.1700.04314.41
5.3.140.1500.04014.43
5.3.130.1800.04014.40
5.3.120.1530.04014.50
5.3.110.1700.04714.40
5.3.100.1570.03313.88
5.3.90.1530.03313.96
5.3.80.1570.03013.89
5.3.70.1530.03713.79
5.3.60.1670.03313.91
5.3.50.1630.03713.93
5.3.40.1570.04013.89
5.3.30.1570.04713.82
5.3.20.1730.03713.75
5.3.10.1730.04313.61
5.3.00.1700.03713.59

preferences:
134.32 ms | 1398 KiB | 7 Q