3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { function __construct() { $this->bar = new Bar($this); } } class Bar { function __construct($foo = null) { $this->foo = $foo; } } $i = 1; while ($i++ < 1000) { $foo = new Foo(); unset($foo); if ($i > 990) { echo number_format(memory_get_usage()) . "\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).

VersionSystem time (s)User time (s)Memory (MiB)
7.2.00.0030.01519.30
7.1.70.0030.00516.95
7.1.60.0040.02219.33
7.1.50.0070.01717.07
7.1.00.0100.06022.42
7.0.200.0000.00716.76
7.0.140.0070.07022.07
7.0.100.0370.04320.88
7.0.90.0530.07320.77
7.0.80.0400.08320.82
7.0.70.0370.08320.66
7.0.60.0500.07720.79
7.0.50.0370.08321.04
7.0.40.0070.08320.11
7.0.30.0070.08019.98
7.0.20.0070.07720.07
7.0.10.0100.08020.16
7.0.00.0100.08720.14
5.6.280.0070.07321.89
5.6.250.0000.04721.40
5.6.240.0130.08721.41
5.6.230.0170.07721.44
5.6.220.0070.08321.50
5.6.210.0070.08321.45
5.6.200.0170.07321.77
5.6.190.0130.07321.90
5.6.180.0100.05021.86
5.6.170.0130.07721.73
5.6.160.0130.08021.81
5.6.150.0100.08321.85
5.6.140.0100.08321.94
5.6.130.0100.08321.91
5.6.120.0000.06021.79
5.6.110.0000.05021.80
5.6.100.0100.03721.82
5.6.90.0000.05021.79
5.6.80.0100.04021.27
5.6.70.0030.08321.18
5.6.60.0000.04321.18
5.6.50.0030.04721.21
5.6.40.0100.06321.08
5.6.30.0030.04321.07
5.6.20.0000.06021.18
5.6.10.0000.04721.24
5.6.00.0100.04021.14
5.5.380.0070.06321.12
5.5.370.0030.09021.29
5.5.360.0170.07021.13
5.5.350.0000.08321.14
5.5.340.0070.08021.66
5.5.330.0030.09021.66
5.5.320.0100.08321.69
5.5.310.0200.07721.60
5.5.300.0000.09321.55
5.5.290.0070.08721.68
5.5.280.0100.06321.58
5.5.270.0070.04321.66
5.5.260.0030.04721.67
5.5.250.0070.04021.39
5.5.240.0030.06720.80
5.5.230.0030.04321.07
5.5.220.0130.07021.06
5.5.210.0030.08320.89
5.5.200.0170.05320.77
5.5.190.0100.06320.86
5.5.180.0100.07720.89
5.5.160.0030.04021.03
5.5.150.0030.04320.91
5.5.140.0030.04720.95
5.5.130.0000.05021.05
5.5.120.0070.03720.87
5.5.110.0100.03721.04
5.5.100.0000.04320.91
5.5.90.0000.04320.89
5.5.80.0070.03720.90
5.5.70.0000.04720.86
5.5.60.0100.04020.91
5.5.50.0070.07320.83
5.5.40.0070.04320.77
5.5.30.0030.04720.92
5.5.20.0070.04320.92
5.5.10.0030.04020.75
5.5.00.0100.04020.75
5.4.450.0070.07720.10
5.4.440.0070.06720.02
5.4.430.0030.04020.04
5.4.420.0100.04020.04
5.4.410.0070.03719.89
5.4.400.0030.04019.61
5.4.390.0000.04019.74
5.4.380.0030.07319.72
5.4.370.0070.06719.73
5.4.360.0200.06719.81
5.4.350.0100.02719.74
5.4.340.0000.04319.57
5.4.320.0130.05319.74
5.4.310.0130.03719.77
5.4.300.0100.06319.72
5.4.290.0170.03719.70
5.4.280.0000.04319.73
5.4.270.0100.03719.76
5.4.260.0030.04019.61
5.4.250.0030.04019.73
5.4.240.0070.03719.79
5.4.230.0130.03319.75
5.4.220.0030.04019.79
5.4.210.0100.03719.81
5.4.200.0030.06719.71
5.4.190.0100.03719.65
5.4.180.0030.04019.69
5.4.170.0030.04319.79
5.4.160.0000.05319.73
5.4.150.0070.04319.77
5.4.140.0070.03716.95
5.4.130.0030.04317.04
5.4.120.0100.02716.89
5.4.110.0000.04017.18
5.4.100.0000.04317.25
5.4.90.0030.03317.17
5.4.80.0030.03717.23
5.4.70.0000.07317.12
5.4.60.0070.05017.02
5.4.50.0030.08017.12
5.4.40.0070.06717.02
5.4.30.0070.07017.12
5.4.20.0100.05717.22
5.4.10.0030.06017.04
5.4.00.0030.08016.54
5.3.290.0000.06315.45
5.3.280.0030.04015.50
5.3.270.0000.04315.48
5.3.260.0000.05015.39
5.3.250.0170.03715.39
5.3.240.0130.04015.39
5.3.230.0030.03715.39
5.3.220.0070.03315.36
5.3.210.0000.03715.38
5.3.200.0000.04015.39
5.3.190.0070.03715.48
5.3.180.0030.04015.47
5.3.170.0030.05015.37
5.3.160.0000.07315.36
5.3.150.0000.06015.39
5.3.140.0070.06715.43
5.3.130.0100.07715.46
5.3.120.0030.08015.29
5.3.110.0100.07715.32
5.3.100.0070.07314.82
5.3.90.0070.07314.79
5.3.80.0100.03314.92
5.3.70.0100.03314.92
5.3.60.0100.07014.91
5.3.50.0070.05014.72
5.3.40.0030.07714.64
5.3.30.0070.06014.74
5.3.20.0030.07014.54
5.3.10.0100.08314.49
5.3.00.0030.08314.53
5.2.170.0030.06311.70
5.2.160.0170.04311.79
5.2.150.0070.06711.54
5.2.140.0230.05011.70
5.2.130.0030.06311.68
5.2.120.0070.03711.67
5.2.110.0070.06311.48
5.2.100.0070.06711.95
5.2.90.0070.06011.67
5.2.80.0200.04711.52
5.2.70.0070.06311.54
5.2.60.0100.05711.49
5.2.50.0030.06011.43
5.2.40.0100.05311.47
5.2.30.0030.06711.62
5.2.20.0100.05711.34
5.2.10.0030.06011.47
5.2.00.0030.07011.21
5.1.60.0070.03310.92
5.1.50.0030.05311.01
5.1.40.0030.05710.93
5.1.30.0030.05011.31
5.1.20.0000.06011.38
5.1.10.0030.06011.10
5.1.00.0130.05010.84
5.0.50.0100.0409.54
5.0.40.0100.0339.32
5.0.30.0030.0679.25
5.0.20.0030.0439.11
5.0.10.0030.0479.18
5.0.00.0070.0679.16
4.4.90.0070.0278.73
4.4.80.0030.0378.73
4.4.70.0070.0308.73
4.4.60.0030.0378.73
4.4.50.0000.0278.73
4.4.40.0000.0538.73
4.4.30.0070.0238.73
4.4.20.0070.0278.73
4.4.10.0100.0238.73
4.4.00.0000.0538.73
4.3.110.0000.0278.73
4.3.100.0070.0208.73
4.3.90.0000.0338.73
4.3.80.0030.0508.73
4.3.70.0070.0338.73
4.3.60.0000.0378.73
4.3.50.0100.0278.73
4.3.40.0000.0578.73
4.3.30.0000.0208.73
4.3.20.0000.0378.73
4.3.10.0000.0338.73
4.3.00.0000.0408.73

preferences:
35.4 ms | 400 KiB | 5 Q