3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class It extends ArrayIterator { public function current() { printf("current\n"); return parent::current(); } } $i = new It(array(1, 2, 3, 4)); foreach($i as $k => $v) { printf("value: %d\n", $v); }
based on 9PRms

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.00.0030.00919.43
7.1.100.0060.00618.17
7.1.70.0000.00816.86
7.1.60.0140.01019.46
7.1.50.0070.01317.03
7.1.00.0070.07322.37
7.0.200.0770.00614.87
7.0.140.0070.03021.99
7.0.60.0030.09019.95
7.0.50.0030.07317.88
7.0.40.0200.04320.05
7.0.30.0330.06720.23
7.0.20.0330.07320.22
7.0.10.0000.05020.26
7.0.00.0130.07720.33
5.6.280.0000.07721.16
5.6.210.0100.07020.63
5.6.200.0030.04018.23
5.6.190.0030.09020.52
5.6.180.0600.06720.61
5.6.170.0270.03720.58
5.6.160.0000.04320.54
5.6.150.0030.05318.20
5.6.140.0030.04318.17
5.6.130.0030.09018.15
5.6.120.0030.04721.02
5.6.110.0030.08020.99
5.6.100.0070.07720.98
5.6.90.0000.08720.99
5.6.80.0000.04020.38
5.5.350.0370.07320.33
5.5.340.0070.07017.99
5.5.330.0100.08020.19
5.5.320.0070.04020.27
5.5.310.0370.06020.34
5.5.300.0030.04718.08
5.5.290.0000.08317.98
5.5.280.0030.04320.97
5.5.270.0030.06720.87
5.5.260.0000.07720.84
5.5.250.0070.06320.79
5.5.240.0100.03020.19
5.4.450.0570.06019.53
5.4.440.0970.06319.47
5.4.430.0370.06019.60
5.4.420.0970.05719.60
5.4.410.0900.05719.26
5.4.400.0970.05719.27
5.4.390.0130.05018.73
5.4.380.0100.05318.75
5.4.370.0130.05318.74
5.4.360.0070.05318.84
5.4.350.0100.05318.75
5.4.340.0100.05318.63
5.4.320.0100.05718.74
5.4.310.0100.05018.63
5.4.300.0200.04018.76
5.4.290.0130.05018.50
5.4.280.0070.05718.56
5.4.270.0130.04718.56
5.4.260.0200.04018.82
5.4.250.0100.05318.76
5.4.240.0130.05718.58
5.4.230.0030.05718.60
5.4.220.0130.05018.62
5.4.210.0200.04718.88
5.4.200.0170.06716.51
5.4.190.0170.05018.71
5.4.180.0170.06018.57
5.4.170.0030.06018.68
5.4.160.0130.05018.68
5.4.150.0200.04318.72
5.4.140.0070.06016.25
5.4.130.0100.04716.30
5.4.120.0130.05016.20
5.4.110.0130.04716.23
5.4.100.0200.05016.20
5.4.90.0070.05716.34
5.4.80.0070.05016.28
5.4.70.0130.04716.31
5.4.60.0070.05316.17
5.4.50.0030.05316.21
5.4.40.0030.06016.41
5.4.30.0100.05316.23
5.4.20.0070.05716.20
5.4.10.0030.05716.29
5.4.00.0200.04715.69
5.3.290.0170.05314.70
5.3.280.0130.05014.78
5.3.270.0170.05014.65
5.3.260.0130.05314.64
5.3.250.0170.04714.63
5.3.240.0130.05714.74
5.3.230.0230.04714.73
5.3.220.0070.07014.61
5.3.210.0130.05714.67
5.3.200.0170.05314.79
5.3.190.0130.05314.79
5.3.180.0100.05014.75
5.3.170.0070.06014.61
5.3.160.0100.05714.68
5.3.150.0070.05714.60
5.3.140.0100.05314.69
5.3.130.0070.06314.65
5.3.120.0130.05714.74
5.3.110.0070.06014.57
5.3.100.0130.05314.08
5.3.90.0130.05014.22
5.3.80.0070.05314.14
5.3.70.0130.05014.18
5.3.60.0100.05014.13
5.3.50.0200.04314.17
5.3.40.0100.05714.10
5.3.30.0170.06014.01
5.3.20.0200.04013.82
5.3.10.0100.05313.86
5.3.00.0100.05013.77
5.2.170.0100.04011.18
5.2.160.0170.04011.20
5.2.150.0070.05311.18
5.2.140.0130.04011.16
5.2.130.0100.04711.23
5.2.120.0130.03711.15
5.2.110.0100.04011.09
5.2.100.0070.05011.21
5.2.90.0100.04311.13
5.2.80.0100.04011.20
5.2.70.0130.04011.22
5.2.60.0130.05711.17
5.2.50.0170.03311.05
5.2.40.0130.03711.01
5.2.30.0070.04311.02
5.2.20.0130.04311.09
5.2.10.0070.04010.88
5.2.00.0070.04010.71
5.1.60.0030.03710.04
5.1.50.0000.04710.11
5.1.40.0030.0409.96
5.1.30.0070.04310.44
5.1.20.0100.04010.45
5.1.10.0100.03310.22
5.1.00.0130.03310.21
5.0.50.0000.0338.59
5.0.40.0070.0238.53
5.0.30.0100.0438.26
5.0.20.0070.0238.23
5.0.10.0030.0308.26
5.0.00.0100.0408.18
4.4.90.0030.0235.94
4.4.80.0070.0205.95
4.4.70.0030.0235.95
4.4.60.0070.0235.91
4.4.50.0000.0275.87
4.4.40.0070.0335.86
4.4.30.0030.0275.88
4.4.20.0030.0275.93
4.4.10.0030.0235.95
4.4.00.0070.0305.98
4.3.110.0030.0235.82
4.3.100.0000.0275.86
4.3.90.0100.0175.79
4.3.80.0100.0335.88
4.3.70.0030.0205.84
4.3.60.0070.0175.82
4.3.50.0030.0235.89
4.3.40.0130.0305.77
4.3.30.0000.0234.64
4.3.20.0070.0174.64
4.3.10.0030.0204.54
4.3.00.0270.03314.46