3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Foo { private $orig; public function bar() { $this->orig = clone $this; } } $foo = new Foo; $history = []; $last = 0; for ($i = 0; $i < 500; $i++) { $foo->bar(); $peak = round(memory_get_peak_usage(true) / 1024 / 1024, 2); if ($peak != $last) { $history[] = $peak; $last = $peak; } } var_dump($history);
based on 7PRN5

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.0070.01017.04
7.2.00.0100.00719.41
7.1.200.0030.00616.09
7.1.100.0070.00718.45
7.1.70.0030.00617.19
7.1.60.0080.00419.40
7.1.50.0090.00917.53
7.1.00.0000.08022.78
7.0.200.0050.00517.11
7.0.140.0130.06722.30
7.0.100.0070.08020.26
7.0.90.0100.08320.18
7.0.80.0000.05320.18
7.0.70.0070.08720.19
7.0.60.0200.06320.17
7.0.50.0400.07320.55
7.0.40.0070.08720.35
7.0.30.0070.08320.32
7.0.20.0130.08020.40
7.0.10.0130.07720.27
7.0.00.0100.06720.29
5.6.280.0070.06721.40
5.6.250.0100.08021.04
5.6.240.0030.09321.03
5.6.230.0100.08320.98
5.6.220.0170.04020.97
5.6.210.0130.07720.79
5.6.200.0200.07321.34
5.6.190.0170.07321.27
5.6.180.0130.07721.41
5.6.170.0100.07721.37
5.6.160.0100.07321.37
5.6.150.0070.08321.42
5.6.140.0070.08721.27
5.6.130.0170.07321.34
5.6.120.0100.07721.43
5.6.110.0000.05021.34
5.6.100.0100.08321.48
5.6.90.0000.08721.32
5.6.80.0130.06320.73
5.6.70.0070.07020.64
5.6.60.0100.08320.80
5.6.50.0130.03720.67
5.6.40.0130.07720.63
5.6.30.0000.07020.79
5.6.20.0130.04320.81
5.6.10.0130.07320.78
5.6.00.0070.07720.79
5.5.380.0030.05320.73
5.5.370.0030.05720.69
5.5.360.0100.07020.66
5.5.350.0130.08020.67
5.5.340.0070.06021.23
5.5.330.0100.07721.06
5.5.320.0200.07021.10
5.5.310.0200.06721.12
5.5.300.0070.08021.16
5.5.290.0200.06021.25
5.5.280.0030.08721.20
5.5.270.0100.08321.19
5.5.260.0130.07321.20
5.5.250.0030.05020.77
5.5.240.0130.06020.63
5.5.230.0170.05320.54
5.5.220.0170.06720.57
5.5.210.0100.07720.34
5.5.200.0000.06320.57
5.5.190.0130.07320.47
5.5.180.0030.04720.60
5.5.160.0070.07720.52
5.5.150.0100.06020.55
5.5.140.0030.07320.54
5.5.130.0100.07720.50
5.5.120.0170.07020.47
5.5.110.0130.04320.46
5.5.100.0070.08320.48
5.5.90.0070.07720.39
5.5.80.0070.07320.40
5.5.70.0100.07720.32
5.5.60.0100.06320.25
5.5.50.0100.07720.40
5.5.40.0070.07020.38
5.5.30.0100.07320.34
5.5.20.0030.05320.36
5.5.10.0030.07320.36
5.5.00.0100.06020.44
5.4.450.0070.04719.89
5.4.440.0030.08319.71
5.4.430.0070.08019.50
5.4.420.0130.03719.75
5.4.410.0070.08019.64
5.4.400.0130.07319.21
5.4.390.0030.08719.27
5.4.380.0100.05019.50
5.4.370.0000.05019.20
5.4.360.0170.06719.43
5.4.350.0030.07719.46
5.4.340.0000.08019.35
5.4.320.0170.07319.17
5.4.310.0100.07319.20
5.4.300.0000.08019.46
5.4.290.0070.07719.28
5.4.280.0070.07319.43
5.4.270.0200.06319.36
5.4.260.0070.04019.46
5.4.250.0130.07719.19
5.4.240.0130.04319.36
5.4.230.0170.06319.36
5.4.220.0070.08019.46
5.4.210.0070.08019.33
5.4.200.0070.07019.34
5.4.190.0000.08319.33
5.4.180.0100.05019.41
5.4.170.0070.05719.19
5.4.160.0070.07719.46
5.4.150.0000.06319.32
5.4.140.0070.05016.78
5.4.130.0030.05716.73
5.4.120.0000.07716.64
5.4.110.0100.07316.59
5.4.100.0170.06716.80
5.4.90.0030.06716.70
5.4.80.0170.06016.70
5.4.70.0070.07016.71
5.4.60.0030.07016.66
5.4.50.0100.07016.80
5.4.40.0200.06316.77
5.4.30.0030.07316.77
5.4.20.0100.05716.73
5.4.10.0070.06716.67
5.4.00.0100.06716.19
5.3.290.0030.07714.72
5.3.280.0100.06714.52
5.3.270.0100.07714.74
5.3.260.0130.06714.55
5.3.250.0130.06714.54
5.3.240.0100.06714.70
5.3.230.0070.07014.52
5.3.220.0070.07714.59
5.3.210.0070.04314.54
5.3.200.0100.05014.70
5.3.190.0030.08014.68
5.3.180.0000.08314.67
5.3.170.0100.07014.54
5.3.160.0130.06714.68
5.3.150.0030.05714.55
5.3.140.0130.06314.61
5.3.130.0100.07014.48
5.3.120.0030.07314.67
5.3.110.0070.07014.54
5.3.100.0130.04014.16
5.3.90.0070.07314.09
5.3.80.0100.05713.91
5.3.70.0100.06714.11
5.3.60.0070.05314.02
5.3.50.0000.07313.97
5.3.40.0030.06713.88
5.3.30.0030.08014.04
5.3.20.0030.04313.81
5.3.10.0130.06013.69
5.3.00.0070.07013.56
5.2.170.0070.05311.07
5.2.160.0030.06711.17
5.2.150.0100.03011.00
5.2.140.0030.06711.14
5.2.130.0030.06311.11
5.2.120.0030.06311.13
5.2.110.0030.04311.01
5.2.100.0100.05311.19
5.2.90.0030.06311.01
5.2.80.0030.05310.96
5.2.70.0130.05711.00
5.2.60.0100.05310.98
5.2.50.0070.05711.14
5.2.40.0070.04311.09
5.2.30.0030.04011.11
5.2.20.0070.06710.82
5.2.10.0070.05010.81
5.2.00.0070.04310.75
5.1.60.0070.0209.99
5.1.50.0070.05310.00
5.1.40.0030.03010.07
5.1.30.0030.04710.41
5.1.20.0000.04710.47
5.1.10.0130.05010.18
5.1.00.0070.05010.12
5.0.50.0030.0478.55
5.0.40.0070.0408.48
5.0.30.0070.0308.26
5.0.20.0030.0178.21
5.0.10.0000.0208.21
5.0.00.0030.0308.16
4.4.90.0030.0277.79
4.4.80.0000.0377.79
4.4.70.0000.0337.79
4.4.60.0030.0237.79
4.4.50.0000.0207.79
4.4.40.0030.0237.79
4.4.30.0000.0377.79
4.4.20.0000.0337.79
4.4.10.0030.0337.79
4.4.00.0000.0307.79
4.3.110.0000.0207.79
4.3.100.0030.0137.79
4.3.90.0070.0107.79
4.3.80.0000.0237.79
4.3.70.0000.0177.79
4.3.60.0030.0137.79
4.3.50.0030.0137.79
4.3.40.0000.0237.79
4.3.30.0000.0237.79
4.3.20.0000.0177.79
4.3.10.0000.0137.79
4.3.00.0030.0177.79