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(); $foo->__destruct(); 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.0070.01114.88
7.4.00.0110.00614.84
7.3.130.0090.00614.89
7.3.120.0080.01014.93
7.3.110.0120.00514.63
7.3.100.0080.00314.79
7.3.90.0030.01314.90
7.3.80.0060.00614.77
7.3.70.0060.00514.78
7.3.60.0030.01214.76
7.3.50.0080.00814.85
7.3.40.0050.00814.59
7.3.30.0080.00814.76
7.3.20.0050.00816.63
7.3.10.0070.00516.53
7.3.00.0090.00516.79
7.2.260.0060.01215.01
7.2.250.0100.00615.15
7.2.240.0050.01214.84
7.2.230.0070.00815.03
7.2.220.0060.00815.07
7.2.210.0030.01214.84
7.2.200.0060.00615.23
7.2.190.0020.01214.99
7.2.180.0050.00914.95
7.2.170.0050.01014.99
7.2.160.0040.00815.17
7.2.150.0000.01117.19
7.2.140.0070.00717.03
7.2.130.0100.00317.09
7.2.120.0040.01117.04
7.2.110.0070.01016.99
7.2.100.0030.00617.04
7.2.90.0030.00716.98
7.2.80.0060.00617.02
7.2.70.0070.01117.01
7.2.60.0070.00717.00
7.2.50.0030.01016.74
7.2.40.0000.01316.77
7.2.30.0150.00016.76
7.2.20.0000.01316.95
7.2.10.0030.00617.06
7.2.00.0050.00718.28
7.1.330.0070.00715.95
7.1.320.0030.01115.80
7.1.310.0060.01015.74
7.1.300.0040.01115.70
7.1.290.0030.00815.75
7.1.280.0030.00815.88
7.1.270.0060.00915.61
7.1.260.0040.00915.90
7.1.250.0080.00615.87
7.1.240.0060.00915.92
7.1.230.0090.00615.59
7.1.220.0040.00815.95
7.1.210.0040.01115.61
7.1.200.0000.01015.79
7.1.190.0070.00415.82
7.1.180.0070.00715.75
7.1.170.0030.00615.99
7.1.160.0030.01315.48
7.1.150.0000.01115.79
7.1.140.0000.01015.91
7.1.130.0100.00715.57
7.1.120.0090.00615.84
7.1.110.0030.00615.63
7.1.100.0070.01015.91
7.1.90.0030.00715.82
7.1.80.0060.00615.96
7.1.70.0080.00816.47
7.1.60.0110.00617.58
7.1.50.0070.01216.45
7.1.40.0060.00615.74
7.1.30.0140.00315.65
7.1.20.0030.00715.97
7.1.10.0040.01215.69
7.1.00.0040.03319.04
7.0.330.0030.00615.50
7.0.320.0040.00715.39
7.0.310.0040.01115.43
7.0.300.0030.01015.54
7.0.290.0030.01315.60
7.0.280.0000.00815.43
7.0.270.0060.01015.40
7.0.260.0060.00915.30
7.0.250.0090.00615.25
7.0.240.0080.00615.39
7.0.230.0100.00315.65
7.0.220.0060.01015.26
7.0.210.0130.00315.53
7.0.200.0080.01116.08
7.0.190.0050.00515.36
7.0.180.0110.00415.55
7.0.170.0090.00615.54
7.0.160.0070.00715.50
7.0.150.0030.00715.54
7.0.140.0040.04018.56
7.0.130.0120.00315.46
7.0.120.0030.04018.83
7.0.110.0030.00815.57
7.0.100.0080.00415.48
7.0.90.0030.00915.58
7.0.80.0090.00915.55
7.0.70.0030.00915.62
7.0.60.0080.04417.67
7.0.50.0060.02416.65
7.0.40.0080.04516.79
7.0.30.0180.03716.71
7.0.20.0120.04916.90
7.0.10.0050.04216.83
7.0.00.0130.03516.95
5.6.400.0060.00914.41
5.6.390.0110.00314.38
5.6.380.0070.00714.42
5.6.370.0040.01514.61
5.6.360.0060.01014.40
5.6.350.0040.01414.73
5.6.340.0000.01414.57
5.6.330.0070.00714.47
5.6.320.0040.01114.74
5.6.310.0030.01714.43
5.6.300.0030.00614.72
5.6.290.0070.01014.06
5.6.280.0050.04017.71
5.6.270.0070.00714.46
5.6.260.0060.00514.58
5.6.250.0090.00314.48
5.6.240.0030.01114.46
5.6.230.0030.01014.62
5.6.220.0070.00714.49
5.6.210.0050.02317.47
5.6.200.0090.03416.35
5.6.190.0020.03217.40
5.6.180.1770.02617.48
5.6.170.0170.03817.67
5.6.160.0070.04517.45
5.6.150.0020.03816.33
5.6.140.0070.04716.28
5.6.130.0050.03716.36
5.6.120.0100.03517.61
5.6.110.0080.03017.71
5.6.100.0100.03317.59
5.6.90.0080.04817.64
5.6.80.0020.04317.43
5.6.70.2260.03017.22
5.6.60.0040.01414.21
5.6.50.0070.01014.63
5.6.40.0150.00314.24
5.6.30.0070.01114.37
5.6.20.0060.00614.21
5.6.10.0070.00714.59
5.6.00.0060.00814.41
5.5.380.0000.01014.55
5.5.370.0090.00014.45
5.5.360.0030.01014.23
5.5.350.2190.02217.41
5.5.340.0050.03816.16
5.5.330.0030.03717.33
5.5.320.1770.02317.54
5.5.310.0200.04517.29
5.5.300.0030.04716.20
5.5.290.0060.04016.25
5.5.280.0020.04217.48
5.5.270.0020.03917.57
5.5.260.0090.04517.44
5.5.250.0110.03017.36
5.5.240.0100.03517.05
5.5.230.0000.01314.32
5.5.220.0000.01213.99
5.5.210.0030.01314.09
5.5.200.0000.01214.13
5.5.190.0070.01014.44
5.5.180.0000.01314.34
5.5.170.0030.01614.46
5.5.160.0130.00614.16
5.5.150.0040.01214.25
5.5.140.0090.00614.32
5.5.130.0000.01214.04
5.5.120.0090.00614.43
5.5.110.0090.00314.42
5.5.100.0030.00914.40
5.5.90.0090.00614.43
5.5.80.0000.01214.49
5.5.70.0030.01314.16
5.5.60.0070.01014.10
5.5.50.0090.00614.44
5.5.40.0130.00314.43
5.5.30.0030.00914.38
5.5.20.0000.01414.18
5.5.10.0090.00614.13
5.5.00.0100.00314.12
5.4.450.0050.04715.46
5.4.440.0050.04315.20
5.4.430.0000.02915.20
5.4.420.0030.02615.30
5.4.410.0030.04315.00
5.4.400.0120.03514.99
5.4.390.0000.02715.12
5.4.380.0070.04315.07
5.4.370.0170.03315.04
5.4.360.0050.03015.27
5.4.350.0050.02415.04
5.4.340.0040.02815.10
5.4.330.0000.01311.19
5.4.320.0060.02615.20
5.4.310.0100.03815.28
5.4.300.0060.04414.83
5.4.290.0020.05114.98
5.4.280.0070.04215.15
5.4.270.0070.04215.03
5.4.260.0050.03515.11
5.4.250.0050.03514.89
5.4.240.0030.03315.21
5.4.230.0090.02015.02
5.4.220.0030.02315.07
5.4.210.0070.02515.15
5.4.200.0030.04415.04
5.4.190.0070.03315.13
5.4.180.0070.04014.97
5.4.170.0020.03115.16
5.4.160.0050.04315.14
5.4.150.0100.01815.04
5.4.140.0050.03813.67
5.4.130.0030.02213.87
5.4.120.0070.03313.79
5.4.110.0070.02313.75
5.4.100.0050.02013.77
5.4.90.0100.02913.57
5.4.80.0000.02913.89
5.4.70.0030.04213.85
5.4.60.0100.03713.71
5.4.50.0030.03513.75
5.4.40.0050.04213.86
5.4.30.0050.03613.84
5.4.20.0060.03913.81
5.4.10.0030.04513.68
5.4.00.0050.03813.54
5.3.290.0060.04312.75
5.3.280.0100.04012.70
5.3.270.0020.04812.70
5.3.260.0020.02812.77
5.3.250.0070.03012.74
5.3.240.0050.02812.70
5.3.230.0020.04312.74
5.3.220.0070.03812.71
5.3.210.0090.03612.71
5.3.200.0070.02812.67
5.3.190.0020.04712.72
5.3.180.0030.02612.70
5.3.170.0050.02812.75
5.3.160.0090.02512.62
5.3.150.0000.04512.69
5.3.140.0100.02512.72
5.3.130.0050.04012.72
5.3.120.0020.03312.72
5.3.110.0030.04212.67
5.3.100.0050.03612.42
5.3.90.0030.02312.47
5.3.80.0070.04112.42
5.3.70.0030.03912.42
5.3.60.0030.03212.42
5.3.50.0030.02412.34
5.3.40.0070.02112.41
5.3.30.0000.02412.43
5.3.20.0050.03812.22
5.3.10.0020.02712.25
5.3.00.0060.03112.25
5.2.170.0030.06711.28
5.2.160.0070.03711.41
5.2.150.0070.06011.44
5.2.140.0030.03711.45
5.2.130.0070.06311.29
5.2.120.0030.03311.41
5.2.110.0030.06711.23
5.2.100.0030.03011.23
5.2.90.0000.04011.26
5.2.80.0030.03711.23
5.2.70.0030.06711.30
5.2.60.0030.03011.10
5.2.50.0070.06311.22
5.2.40.0000.06011.14
5.2.30.0070.03711.17
5.2.20.0030.03011.11
5.2.10.0130.03310.88
5.2.00.0030.05010.76
5.1.60.0000.0479.98
5.1.50.0030.06010.07
5.1.40.0030.0279.94
5.1.30.0030.03710.30
5.1.20.0070.04710.28
5.1.10.0030.04010.13
5.1.00.0000.03010.05
5.0.50.0030.0238.55
5.0.40.0070.0378.48
5.0.30.0070.0638.23
5.0.20.0100.0408.11
5.0.10.0030.0278.17
5.0.00.0000.0338.21
4.4.90.0030.0178.09
4.4.80.0000.0408.09
4.4.70.0000.0308.09
4.4.60.0000.0208.09
4.4.50.0070.0338.09
4.4.40.0000.0338.09
4.4.30.0100.0138.09
4.4.20.0030.0338.09
4.4.10.0000.0338.09
4.4.00.0000.0378.09
4.3.110.0030.0378.09
4.3.100.0030.0378.09
4.3.90.0030.0238.09
4.3.80.0030.0308.09
4.3.70.0030.0308.09
4.3.60.0030.0208.09
4.3.50.0000.0208.09
4.3.40.0000.0278.09
4.3.30.0030.0338.09
4.3.20.0000.0378.09
4.3.10.0000.0278.09
4.3.00.0000.0178.09

preferences:
40.32 ms | 401 KiB | 5 Q