3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { function __construct() { $this->bar = new Bar($this); } function __destruct() { unset($this->bar); } } 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.3.120.0120.00415.65
7.3.110.0030.01615.86
7.3.100.0070.01015.82
7.3.90.0110.01115.57
7.3.80.0070.00415.55
7.3.70.0070.01015.68
7.3.60.0070.00715.49
7.3.50.0000.01415.33
7.3.40.0110.00415.50
7.3.30.0040.00815.73
7.3.20.0040.01116.72
7.3.10.0070.00716.56
7.3.00.0070.00916.75
7.2.240.0000.01815.77
7.2.230.0090.00915.90
7.2.220.0110.00716.02
7.2.210.0060.00715.76
7.2.200.0040.01415.92
7.2.190.0070.01415.76
7.2.180.0060.00915.72
7.2.170.0000.01415.82
7.2.160.0100.00616.07
7.2.150.0120.00317.05
7.2.140.0120.00616.84
7.2.130.0050.00816.91
7.2.120.0040.01116.96
7.2.110.0070.00917.07
7.2.100.0070.00816.89
7.2.90.0070.00716.96
7.2.80.0080.00416.90
7.2.70.0040.00916.94
7.2.60.0100.00516.95
7.2.50.0070.00517.03
7.2.40.0010.01217.00
7.2.30.0060.00917.02
7.2.20.0090.00417.05
7.2.10.0030.00916.99
7.2.00.0030.01117.55
7.1.330.0120.00615.98
7.1.320.0060.01015.68
7.1.310.0030.01315.57
7.1.300.0080.00815.89
7.1.290.0040.01115.98
7.1.280.0060.01215.59
7.1.270.0060.00915.66
7.1.260.0000.01115.66
7.1.250.0070.00615.90
7.1.70.0060.00317.33
7.1.60.0100.01019.40
7.1.50.0000.02316.91
7.1.00.0030.03322.39
7.0.200.0030.00616.82
7.0.140.0000.07722.01
7.0.60.0230.06320.86
7.0.50.0030.05018.68
7.0.40.0030.07317.79
7.0.30.0130.06717.81
7.0.20.0000.05717.72
7.0.10.0100.05317.76
7.0.00.0070.08317.74
5.6.280.0000.08021.82
5.6.210.0070.08721.54
5.6.200.0070.04718.92
5.6.190.0130.08018.96
5.6.180.0070.08018.77
5.6.170.0030.06019.00
5.6.160.0070.08318.92
5.6.150.0100.07718.94
5.6.140.0070.08318.76
5.6.130.0100.08318.90
5.6.120.0100.08318.92
5.6.110.0100.08018.93
5.6.100.0130.07318.88
5.6.90.0100.08018.88
5.6.80.0070.05318.35
5.6.70.0070.04718.34
5.6.60.0070.05318.28
5.6.50.0000.07018.32
5.6.40.0130.07318.22
5.6.30.0130.05018.27
5.6.20.0070.08318.24
5.6.10.0000.08318.24
5.6.00.0070.08018.25
5.5.350.0170.08721.19
5.5.340.0030.07018.72
5.5.330.0030.08318.71
5.5.320.0070.04718.69
5.5.310.0030.04718.73
5.5.300.0070.04718.76
5.5.290.0030.08718.80
5.5.280.0030.08018.74
5.5.270.0100.04718.57
5.5.260.0130.06318.66
5.5.250.0030.05718.59
5.5.240.0100.04018.20
5.5.230.0030.04318.14
5.5.220.0000.06018.11
5.5.210.0070.04018.15
5.5.200.0070.08018.06
5.5.190.0000.05718.03
5.5.180.0070.07318.08
5.5.160.0070.04718.04
5.5.150.0030.04318.11
5.5.140.0100.07318.09
5.5.130.0070.04718.09
5.5.120.0100.05318.11
5.5.110.0100.07318.11
5.5.100.0000.08017.83
5.5.90.0100.07017.95
5.5.80.0000.07717.95
5.5.70.0130.05317.97
5.5.60.0000.07318.00
5.5.50.0170.06718.01
5.5.40.0000.04317.96
5.5.30.0170.04017.93
5.5.20.0070.05017.96
5.5.10.0030.05317.95
5.5.00.0070.06318.00
5.4.450.0030.08320.08
5.4.440.0030.07019.92
5.4.430.0100.04719.93
5.4.420.0100.07719.91
5.4.410.0070.07019.93
5.4.400.0200.06319.63
5.4.390.0000.04319.74
5.4.380.0070.04019.84
5.4.370.0130.07019.59
5.4.360.0070.08019.60
5.4.350.0070.05719.85
5.4.340.0030.07319.71
5.4.320.0100.06019.84
5.4.310.0000.05019.57
5.4.300.0130.06719.78
5.4.290.0030.05019.61
5.4.280.0100.08019.75
5.4.270.0100.06719.60
5.4.260.0070.07319.68
5.4.250.0070.07319.68
5.4.240.0000.06319.74
5.4.230.0130.06319.68
5.4.220.0070.07719.67
5.4.210.0070.07319.70
5.4.200.0070.04319.60
5.4.190.0030.05019.59
5.4.180.0170.07019.57
5.4.170.0100.07719.81
5.4.160.0100.04319.57
5.4.150.0100.07019.66
5.4.140.0130.05317.12
5.4.130.0070.04317.09
5.4.120.0000.04316.93
5.4.110.0170.07017.17
5.4.100.0030.04317.16
5.4.90.0070.03717.27
5.4.80.0070.07717.14
5.4.70.0070.05017.03
5.4.60.0030.05017.12
5.4.50.0100.07317.11
5.4.40.0130.06717.17
5.4.30.0070.07716.96
5.4.20.0000.07717.09
5.4.10.0170.07317.12
5.4.00.0000.06316.59
5.3.290.0000.04315.36
5.3.280.0100.07015.43
5.3.270.0100.06315.45
5.3.260.0070.08715.44
5.3.250.0100.07715.54
5.3.240.0030.05315.51
5.3.230.0000.05015.40
5.3.220.0030.05015.48
5.3.210.0070.03715.48
5.3.200.0100.07715.29
5.3.190.0030.05315.49
5.3.180.0070.07715.39
5.3.170.0100.05715.40
5.3.160.0000.05015.48
5.3.150.0100.06715.41
5.3.140.0000.04315.36
5.3.130.0100.07315.55
5.3.120.0100.07715.24
5.3.110.0000.08315.43
5.3.100.0100.07014.85
5.3.90.0030.06714.91
5.3.80.0100.06314.79
5.3.70.0100.03714.81
5.3.60.0030.07314.82
5.3.50.0070.07314.82
5.3.40.0000.05314.79
5.3.30.0100.07014.60
5.3.20.0130.07014.52
5.3.10.0030.07314.36
5.3.00.0030.03714.41
5.2.170.0000.04311.94
5.2.160.0030.06311.89
5.2.150.0030.07011.90
5.2.140.0030.07011.89
5.2.130.0070.06311.86
5.2.120.0000.05311.91
5.2.110.0100.04711.95
5.2.100.0000.07011.77
5.2.90.0000.07311.89
5.2.80.0070.06011.69
5.2.70.0070.04311.74
5.2.60.0070.06011.72
5.2.50.0100.05311.82
5.2.40.0030.06711.97
5.2.30.0070.04011.79
5.2.20.0030.06011.63
5.2.10.0070.06711.56
5.2.00.0030.04311.29
5.1.60.0070.05710.89
5.1.50.0030.05710.89
5.1.40.0030.05010.89
5.1.30.0000.06011.31
5.1.20.0070.04711.32
5.1.10.0130.05010.95
5.1.00.0070.05710.98
5.0.50.0070.0479.54
5.0.40.0070.0439.29
5.0.30.0030.0709.11
5.0.20.0000.0539.07
5.0.10.0030.0479.07
5.0.00.0030.0709.29
4.4.90.0070.0239.07
4.4.80.0070.0309.07
4.4.70.0070.0339.07
4.4.60.0030.0339.07
4.4.50.0100.0279.07
4.4.40.0070.0539.07
4.4.30.0070.0339.07
4.4.20.0000.0379.07
4.4.10.0030.0379.07
4.4.00.0000.0539.07
4.3.110.0030.0179.07
4.3.100.0070.0339.07
4.3.90.0000.0239.07
4.3.80.0030.0309.07
4.3.70.0030.0379.07
4.3.60.0000.0179.07
4.3.50.0100.0179.07
4.3.40.0000.0539.07
4.3.30.0000.0409.07
4.3.20.0070.0339.07
4.3.10.0000.0379.07
4.3.00.0030.0339.07

preferences:
42.29 ms | 400 KiB | 5 Q