3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { function __construct() { $this->bar = new Bar($this); } function __descruct() { 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.4.10.0100.01015.63
7.4.00.0000.01615.76
7.3.130.0070.01115.47
7.3.120.0060.01215.52
7.3.110.0130.00715.71
7.3.100.0030.01515.89
7.3.90.0100.00715.25
7.3.80.0030.01315.62
7.3.70.0100.01015.67
7.3.60.0110.00815.56
7.3.50.0030.01215.30
7.3.40.0110.00715.69
7.3.30.0070.00315.59
7.3.20.0060.00916.73
7.3.10.0070.00316.85
7.3.00.0090.00616.70
7.2.260.0060.01216.04
7.2.250.0140.00716.13
7.2.240.0030.01315.92
7.2.230.0100.00715.97
7.2.220.0110.00415.73
7.2.210.0060.00615.91
7.2.200.0140.00715.99
7.2.190.0060.01015.64
7.2.180.0030.00715.82
7.2.170.0090.00615.87
7.2.160.0030.01316.00
7.2.150.0070.00717.14
7.2.140.0070.00717.17
7.2.130.0040.00716.75
7.2.120.0030.01316.96
7.2.110.0070.00416.89
7.2.100.0120.00417.13
7.2.90.0100.00717.06
7.2.80.0190.00516.74
7.2.70.0100.00717.11
7.2.60.0000.02016.85
7.2.50.0060.01316.89
7.2.40.0040.01117.07
7.2.30.0000.01517.03
7.2.20.0120.00417.09
7.2.10.0060.00617.04
7.2.00.0070.00618.19
7.1.330.0090.00916.02
7.1.320.0030.00715.93
7.1.310.0070.00315.48
7.1.300.0030.01015.61
7.1.290.0040.00715.84
7.1.280.0070.00415.84
7.1.270.0030.00715.91
7.1.260.0070.00716.02
7.1.250.0110.00015.82
7.1.240.0030.00915.84
7.1.230.0080.00815.71
7.1.220.0060.00315.93
7.1.210.0040.01215.52
7.1.200.0020.01815.67
7.1.190.0080.01115.60
7.1.180.0150.00015.86
7.1.170.0070.00715.88
7.1.160.0060.00315.83
7.1.150.0000.01215.61
7.1.140.0040.01216.01
7.1.130.0000.01015.94
7.1.120.0040.01215.88
7.1.110.0000.01315.80
7.1.100.0030.01016.02
7.1.90.0030.00616.02
7.1.80.0100.00316.07
7.1.70.0050.00916.52
7.1.60.0090.01117.71
7.1.50.0090.01016.51
7.1.40.0060.00615.77
7.1.30.0090.00615.85
7.1.20.0090.00615.96
7.1.10.0040.01215.88
7.1.00.0080.03819.14
7.0.330.0000.00915.51
7.0.320.0100.00015.64
7.0.310.0110.00815.47
7.0.300.0070.01015.49
7.0.290.0000.00915.70
7.0.280.0040.01115.57
7.0.270.0050.00515.46
7.0.260.0040.00815.28
7.0.250.0070.00715.25
7.0.240.0100.00315.32
7.0.230.0040.00715.33
7.0.220.0030.01015.51
7.0.210.0110.00315.63
7.0.200.0340.00915.24
7.0.190.0120.00315.52
7.0.180.0040.00815.21
7.0.170.0030.01315.55
7.0.160.0090.00615.55
7.0.150.0090.00915.59
7.0.140.0040.04118.83
7.0.130.0030.01015.45
7.0.120.0030.03718.89
7.0.110.0060.00615.58
7.0.100.0060.00315.53
7.0.90.0100.00715.63
7.0.80.0100.00315.56
7.0.70.0040.00415.58
7.0.60.0090.04018.33
7.0.50.0030.04617.13
7.0.40.0020.02616.82
7.0.30.0120.04816.79
7.0.20.0120.02516.87
7.0.10.0050.03716.96
7.0.00.0030.02816.95
5.6.400.0040.01115.31
5.6.390.0070.00715.21
5.6.380.0090.00915.08
5.6.370.0070.01315.34
5.6.360.0000.01815.02
5.6.350.0000.01415.36
5.6.340.0060.00615.39
5.6.330.0040.01415.51
5.6.320.0140.00315.41
5.6.310.0080.00415.18
5.6.300.0040.01115.19
5.6.290.0030.01315.47
5.6.280.0050.04418.42
5.6.270.0070.00715.08
5.6.260.0040.00815.48
5.6.250.0030.01315.28
5.6.240.0000.01715.43
5.6.230.0040.01115.07
5.6.220.0000.01315.14
5.6.210.0000.03118.29
5.6.200.0050.04817.14
5.6.190.0080.04518.12
5.6.180.0210.02618.31
5.6.170.0110.02818.17
5.6.160.0080.03118.06
5.6.150.0120.04317.20
5.6.140.0050.04617.01
5.6.130.0100.04217.10
5.6.120.0080.02818.48
5.6.110.0060.02818.39
5.6.100.0080.03818.43
5.6.90.0020.05018.48
5.6.80.0030.05118.26
5.6.70.0060.00614.88
5.6.60.0030.01615.07
5.6.50.0000.01615.27
5.6.40.0030.01015.09
5.6.30.0030.01414.87
5.6.20.0120.00615.23
5.6.10.0090.00915.34
5.6.00.0030.01115.27
5.5.380.0000.01515.28
5.5.370.0060.00615.18
5.5.360.0060.00915.05
5.5.350.0050.02618.21
5.5.340.0050.04917.01
5.5.330.0070.04618.14
5.5.320.0100.03317.98
5.5.310.0190.04018.15
5.5.300.0050.04716.79
5.5.290.0070.02516.85
5.5.280.0070.04818.31
5.5.270.0050.05018.39
5.5.260.0050.03818.57
5.5.250.0070.03918.08
5.5.240.0150.03618.12
5.5.230.0030.01315.14
5.5.220.0000.01114.95
5.5.210.0120.00614.95
5.5.200.0100.00715.22
5.5.190.0120.00315.33
5.5.180.0030.01015.25
5.5.170.0090.00615.05
5.5.160.0090.00915.23
5.5.150.0130.00315.26
5.5.140.0080.00615.20
5.5.130.0110.00415.24
5.5.120.0100.00015.20
5.5.110.0030.01315.18
5.5.100.0030.01315.24
5.5.90.0060.00614.96
5.5.80.0080.00414.96
5.5.70.0040.01515.03
5.5.60.0070.00714.68
5.5.50.0070.00714.82
5.5.40.0070.01114.96
5.5.30.0070.00315.23
5.5.20.0040.00814.98
5.5.10.0090.00614.89
5.5.00.0070.01115.08
5.4.450.0080.04315.95
5.4.440.0040.04015.97
5.4.430.0050.04415.79
5.4.420.0020.05016.10
5.4.410.0050.03815.69
5.4.400.0080.03015.56
5.4.390.0050.04515.86
5.4.380.0070.04215.72
5.4.370.0080.03315.71
5.4.360.0050.02815.85
5.4.350.0080.03815.83
5.4.340.0030.04415.72
5.4.330.0030.00611.58
5.4.320.0020.04915.71
5.4.310.0080.03415.71
5.4.300.0070.04215.71
5.4.290.0030.04315.70
5.4.280.0020.04015.63
5.4.270.0050.03715.79
5.4.260.0020.04615.76
5.4.250.0050.03115.50
5.4.240.0030.02415.76
5.4.230.0110.03815.80
5.4.220.0030.04415.74
5.4.210.0080.04315.75
5.4.200.0020.03215.71
5.4.190.0080.03515.74
5.4.180.0090.04015.60
5.4.170.0050.03915.65
5.4.160.0100.03715.50
5.4.150.0070.03015.59
5.4.140.0040.04414.42
5.4.130.0050.04014.37
5.4.120.0050.04214.37
5.4.110.0000.04314.42
5.4.100.0050.04214.28
5.4.90.0050.04314.46
5.4.80.0060.02514.46
5.4.70.0050.02914.50
5.4.60.0030.02614.55
5.4.50.0100.03914.23
5.4.40.0090.03914.43
5.4.30.0070.03814.46
5.4.20.0070.04114.37
5.4.10.0030.02914.33
5.4.00.0050.04314.06
5.3.290.0070.04113.51
5.3.280.0070.02313.30
5.3.270.0050.04613.40
5.3.260.0040.02713.38
5.3.250.0020.04713.52
5.3.240.0110.02613.43
5.3.230.0080.04413.44
5.3.220.0020.03713.38
5.3.210.0050.03013.19
5.3.200.0040.03913.22
5.3.190.0080.03513.23
5.3.180.0050.03913.40
5.3.170.0030.03913.49
5.3.160.0030.02513.24
5.3.150.0070.03613.42
5.3.140.0050.04713.30
5.3.130.0080.03413.28
5.3.120.0070.04013.25
5.3.110.0020.04313.29
5.3.100.0030.04512.96
5.3.90.0070.02213.16
5.3.80.0100.04013.13
5.3.70.0080.02813.03
5.3.60.0100.03713.06
5.3.50.0050.02213.09
5.3.40.0030.03912.91
5.3.30.0030.03413.14
5.3.20.0080.03312.89
5.3.10.0060.02312.66
5.3.00.0050.03712.67
5.2.170.0070.06011.89
5.2.160.0000.05311.85
5.2.150.0070.02711.94
5.2.140.0100.06311.84
5.2.130.0000.04311.96
5.2.120.0000.04711.69
5.2.110.0100.02311.89
5.2.100.0030.06711.72
5.2.90.0070.06011.56
5.2.80.0000.07011.54
5.2.70.0130.05711.48
5.2.60.0030.05311.61
5.2.50.0000.03311.46
5.2.40.0030.03311.38
5.2.30.0070.02711.50
5.2.20.0000.03011.57
5.2.10.0000.03011.31
5.2.00.0070.02311.13
5.1.60.0000.02710.94
5.1.50.0030.02310.89
5.1.40.0030.02710.96
5.1.30.0030.02711.40
5.1.20.0030.02711.27
5.1.10.0000.02711.15
5.1.00.0100.02311.06
5.0.50.0000.0239.52
5.0.40.0000.0209.38
5.0.30.0070.0279.10
5.0.20.0030.0209.27
5.0.10.0000.0209.09
5.0.00.0000.0379.05
4.4.90.0000.0208.14
4.4.80.0000.0178.14
4.4.70.0000.0178.14
4.4.60.0000.0178.14
4.4.50.0030.0138.14
4.4.40.0000.0278.14
4.4.30.0000.0178.14
4.4.20.0000.0178.14
4.4.10.0000.0208.14
4.4.00.0000.0238.14
4.3.110.0000.0178.14
4.3.100.0070.0138.14
4.3.90.0000.0138.14
4.3.80.0000.0238.14
4.3.70.0070.0108.14
4.3.60.0000.0178.14
4.3.50.0100.0078.14
4.3.40.0000.0238.14
4.3.30.0000.0178.14
4.3.20.0000.0238.14
4.3.10.0000.0138.14
4.3.00.0000.0138.14

preferences:
36.48 ms | 401 KiB | 5 Q