3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php // open this directory $myDirectory = opendir("/"); // get each entry while($entryName = readdir($myDirectory)) { $dirArray[] = $entryName; } // close directory closedir($myDirectory); // count elements in array $indexCount = count($dirArray); Print ("$indexCount files<br>\n"); // sort 'em sort($dirArray); // print 'em print("<TABLE border=1 cellpadding=5 cellspacing=0 class=whitelinks>\n"); print("<TR><TH>Filename</TH><th>Filetype</th><th>Filesize</th></TR>\n"); // loop through the array of files and print them all for($index=0; $index < $indexCount; $index++) { if (substr("$dirArray[$index]", 0, 1) != "."){ // don't list hidden files print("<TR><TD><a href=\"$dirArray[$index]\">$dirArray[$index]</a></td>"); print("<td>"); print(filetype($dirArray[$index])); print("</td>"); print("<td>"); print(filesize($dirArray[$index])); print("</td>"); print("</TR>\n"); } } print("</TABLE>\n");

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).
Note: hhvm uses a JIT which only kicks in after a few runs. Since we run scripts only once, hhvm always runs slower.

VersionSystem time (s)User time (s)Memory (MiB)
7.2.60.0030.00616.95
7.2.00.0070.00719.42
7.1.200.0070.00715.78
7.1.100.0130.01017.84
7.1.70.0030.00717.11
7.1.60.0070.01719.40
7.1.50.0100.01316.93
7.1.00.0000.04022.34
7.0.200.0000.01116.70
7.0.140.0030.07322.18
7.0.60.0070.07020.02
7.0.50.0000.06317.71
7.0.40.0100.05719.98
7.0.30.0400.06720.01
7.0.20.0300.06020.16
7.0.10.0030.09320.09
7.0.00.0070.05320.01
5.6.280.0000.07721.04
5.6.210.0030.08020.67
5.6.200.0100.08318.22
5.6.190.0000.04320.39
5.6.180.0300.05020.39
5.6.170.0130.05320.45
5.6.160.0200.07020.61
5.6.150.0070.03718.08
5.6.140.0100.08018.18
5.6.130.0030.08718.07
5.6.120.0100.07721.13
5.6.110.0170.07321.03
5.6.100.0130.08321.11
5.6.90.0130.05721.05
5.6.80.0030.07720.44
5.5.350.0100.08020.50
5.5.340.0070.04317.88
5.5.330.0070.05020.19
5.5.320.1430.05020.13
5.5.310.0300.07020.41
5.5.300.0130.07317.96
5.5.290.0170.07017.98
5.5.280.0130.07720.89
5.5.270.0170.06320.64
5.5.260.0070.08020.74
5.5.250.0070.05720.50
5.5.240.0000.09020.29
5.4.450.0070.04319.44
5.4.440.0170.08319.14
5.4.430.1600.04319.46
5.4.420.1600.04319.57
5.4.410.1370.03319.02
5.4.400.1530.04718.72
5.4.390.1430.04718.73
5.4.380.1300.04319.16
5.4.370.1400.03718.99
5.4.360.1530.05019.14
5.4.350.1300.04018.84
5.4.340.1300.04018.84
5.4.320.1700.05719.16
5.4.310.1570.04318.83
5.4.300.0200.06718.84
5.4.290.0270.06719.12
5.4.280.0200.05018.71
5.4.270.0270.03718.98
5.4.260.0270.07018.84
5.4.250.0300.05318.71
5.4.240.0200.05318.83
5.4.230.0270.06718.81
5.4.220.0230.06019.11
5.4.210.0270.06718.68
5.4.200.0400.06719.14
5.4.190.0270.07018.68
5.4.180.0270.06718.96
5.4.170.0230.06019.13
5.4.160.0400.07319.19
5.4.150.0170.04019.14
5.4.140.0270.06716.16
5.4.130.0300.05316.34
5.4.120.0230.05316.25
5.4.110.0130.04316.42
5.4.100.0270.03716.38
5.4.90.0200.07016.41
5.4.80.0300.04016.44
5.4.70.0200.04316.39
5.4.60.0330.04316.04
5.4.50.0230.04316.27
5.4.40.0200.03716.40
5.4.30.0200.04716.16
5.4.20.0170.03716.36
5.4.10.0270.03016.27
5.4.00.0200.05315.80
5.3.290.0130.04714.53
5.3.280.0230.03314.56
5.3.270.0230.03314.55
5.3.260.0400.04314.57
5.3.250.0200.03714.66
5.3.240.0230.03314.45
5.3.230.0230.03314.44
5.3.220.0200.03714.52
5.3.210.0170.05014.62
5.3.200.0170.03714.51
5.3.190.0230.03314.51
5.3.180.0230.04314.59
5.3.170.0200.05314.67
5.3.160.0200.04714.53
5.3.150.0300.05314.67
5.3.140.0230.04314.42
5.3.130.0230.06014.41
5.3.120.0200.04314.40
5.3.110.0270.06014.46
5.3.100.0170.04313.89
5.3.90.0200.05713.97
5.3.80.0170.04314.03
5.3.70.0230.03313.94
5.3.60.0130.04014.03
5.3.50.0230.03313.74
5.3.40.0270.04013.82
5.3.30.0230.04713.86
5.3.20.0170.04313.77
5.3.10.0100.04313.60
5.3.00.0170.04713.74
5.2.170.0170.06011.01
5.2.160.0170.02711.02
5.2.150.0130.03711.18
5.2.140.0200.05311.21
5.2.130.0170.03711.06
5.2.120.0200.02710.96
5.2.110.0200.05711.02
5.2.100.0230.03310.95
5.2.90.0270.03310.95
5.2.80.0170.03310.96
5.2.70.0170.03711.13
5.2.60.0230.05311.11
5.2.50.0200.03010.88
5.2.40.0170.03311.03
5.2.30.0170.03010.92
5.2.20.0170.02310.86
5.2.10.0230.05310.87
5.2.00.0130.04010.88
5.1.60.0230.04710.00
5.1.50.0130.05010.23
5.1.40.0200.0379.89
5.1.30.0200.04710.35
5.1.20.0230.05010.43
5.1.10.0200.05010.23
5.1.00.0130.0509.99
5.0.50.0130.0408.95
5.0.40.0070.0438.95
5.0.30.0100.0638.95
5.0.20.0130.0338.95
5.0.10.0100.0278.95
5.0.00.0130.0578.95
4.4.90.0100.0378.95
4.4.80.0100.0378.95
4.4.70.0070.0308.95
4.4.60.0100.0378.95
4.4.50.0130.0338.95
4.4.40.0170.0508.95
4.4.30.0100.0378.95
4.4.20.0100.0378.95
4.4.10.0170.0238.95
4.4.00.0130.0538.95
4.3.110.0100.0208.95
4.3.100.0170.0278.95
4.3.90.0070.0308.95
4.3.80.0100.0508.95
4.3.70.0070.0408.95
4.3.60.0130.0308.95
4.3.50.0070.0208.95
4.3.40.0070.0308.95
4.3.30.0130.0308.95
4.3.20.0030.0408.95
4.3.10.0030.0378.95
4.3.00.0030.0238.95