3v4l.org

run code in 300+ PHP versions simultaneously
<?php gc_enable(); class test { public $spl; public function __construct() { $this->spl = new stdClass(); $this->spl->foo = $this; } } $i = 0; while($i < 100) { $test = new test(); unset($test); gc_collect_cycles(); echo sprintf('%1$04d: ', $i) . number_format(memory_get_usage()) . " B\n"; $i++; }

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.00.0110.00715.15
7.3.120.0090.00914.77
7.3.110.0040.01514.81
7.3.100.0000.01914.84
7.3.90.0070.00714.66
7.3.80.0090.00914.98
7.3.70.0070.00714.80
7.3.60.0030.00614.75
7.3.50.0110.00714.85
7.3.40.0000.01514.76
7.3.30.0000.01414.63
7.3.20.0030.01316.50
7.3.10.0040.01016.66
7.3.00.0070.00716.73
7.2.250.0100.01115.20
7.2.240.0030.01715.20
7.2.230.0100.01015.10
7.2.220.0090.00614.61
7.2.210.0030.00615.03
7.2.200.0030.01315.15
7.2.190.0090.00615.05
7.2.180.0060.00915.05
7.2.170.0000.01215.20
7.2.130.0130.00317.02
7.2.120.0030.01316.92
7.2.110.0070.01116.90
7.2.100.0070.00716.94
7.2.90.0030.01316.94
7.2.80.0080.00816.98
7.2.70.0030.00917.08
7.2.60.0100.00317.15
7.2.50.0070.01016.96
7.2.40.0060.00616.86
7.2.30.0070.00716.89
7.2.20.0080.00316.86
7.2.10.0040.01216.98
7.2.00.0100.00418.21
7.1.330.0090.00615.80
7.1.320.0120.00615.89
7.1.310.0030.01015.89
7.1.300.0040.00815.59
7.1.290.0060.00615.80
7.1.280.0070.00715.59
7.1.270.0000.01715.88
7.1.260.0060.00615.80
7.1.250.0000.00715.59
7.1.70.0080.00317.22
7.1.60.0150.00919.46
7.1.50.0030.02016.76
7.1.00.0030.07722.48
7.0.200.0030.00616.93
7.0.140.0030.07722.18
7.0.60.0070.08319.98
7.0.50.0030.08017.98
7.0.40.0100.08020.20
7.0.30.0270.04020.25
7.0.20.0230.05020.09
7.0.10.0030.09020.16
7.0.00.0070.09320.05
5.6.280.0070.07020.82
5.6.210.0130.05320.65
5.6.200.0030.07318.19
5.6.190.0030.04320.41
5.6.180.0200.07720.64
5.6.170.0270.04720.44
5.6.160.0030.07320.54
5.6.150.0100.04718.15
5.6.140.0100.08018.13
5.6.130.0100.06318.19
5.6.120.0030.04321.00
5.6.110.0070.06021.00
5.6.100.0030.07320.98
5.6.90.0100.05720.98
5.6.80.0100.08020.38
5.5.350.4200.04020.53
5.5.340.0100.06017.98
5.5.330.0100.07720.07
5.5.320.0200.08720.27
5.5.310.0330.08320.26
5.5.300.0030.04017.99
5.5.290.0070.08717.95
5.5.280.0000.09020.73
5.5.270.0100.03320.77
5.5.260.0070.07020.87
5.5.250.0130.07020.68
5.5.240.0100.05020.34
5.4.450.0070.06719.20
5.4.440.0100.06719.23
5.4.430.0030.07719.20
5.4.420.0000.08319.54
5.4.410.0030.04719.09
5.4.400.0130.06718.85
5.4.390.0030.07719.25
5.4.380.0030.07319.38
5.4.370.0000.03719.03
5.4.360.0030.03719.28
5.4.350.0030.03719.21
5.4.340.0070.07019.22
5.4.320.0070.06018.98
5.4.310.0000.05719.26
5.4.300.0070.07319.22
5.4.290.0030.08318.85
5.4.280.0100.06319.22
5.4.270.0030.06719.37
5.4.260.0070.07019.15
5.4.250.0030.05319.36
5.4.240.0030.03719.05
5.4.230.0000.04019.37
5.4.220.0130.06019.12
5.4.210.0070.05318.94
5.4.200.0100.05719.22
5.4.190.0000.04719.13
5.4.180.0070.05719.25
5.4.170.0100.05019.08
5.4.160.0030.03718.92
5.4.150.0000.04719.36
5.4.140.0070.06716.31
5.4.130.0100.05016.52
5.4.120.0070.03716.34
5.4.110.0030.07316.40
5.4.100.0030.07716.24
5.4.90.0000.07716.60
5.4.80.0000.06316.23
5.4.70.0030.07316.61
5.4.60.0030.07716.52
5.4.50.0000.07316.38
5.4.40.0000.07316.52
5.4.30.0100.06716.59
5.4.20.0030.03716.24
5.4.10.0000.04016.24
5.4.00.0030.03315.80
5.3.290.0000.08014.64
5.3.280.0000.08014.57
5.3.270.0070.04314.61
5.3.260.0030.04714.58
5.3.250.0070.06314.57
5.3.240.0070.06314.59
5.3.230.0000.07014.58
5.3.220.0030.07014.54
5.3.210.0000.07714.55
5.3.200.0070.07314.56
5.3.190.0000.07714.55
5.3.180.0030.07714.66
5.3.170.0070.05014.53
5.3.160.0030.07314.78
5.3.150.0070.07014.68
5.3.140.0100.07014.60
5.3.130.0070.06714.53
5.3.120.0030.07314.59
5.3.110.0030.04014.52
5.3.100.0070.07014.14
5.3.90.0100.06014.01
5.3.80.0030.05014.02
5.3.70.0070.06314.03
5.3.60.0070.07314.05
5.3.50.0070.04014.01
5.3.40.0000.03713.88
5.3.30.0000.05313.91
5.3.20.0030.07013.77
5.3.10.0030.07013.64
5.3.00.0070.06713.54
5.2.170.0000.03012.50
5.2.160.0000.03312.50
5.2.150.0000.03012.50
5.2.140.0000.05712.50
5.2.130.0030.06012.50
5.2.120.0030.06012.50
5.2.110.0070.05312.50
5.2.100.0030.06312.50
5.2.90.0030.04312.50
5.2.80.0030.05012.50
5.2.70.0030.06012.50
5.2.60.0000.05712.50
5.2.50.0170.02712.50
5.2.40.0100.05312.50
5.2.30.0070.04012.50
5.2.20.0070.05312.50
5.2.10.0000.06312.50
5.2.00.0030.05012.50
5.1.60.0000.03312.50
5.1.50.0070.02712.50
5.1.40.0070.02712.50
5.1.30.0000.04012.50
5.1.20.0000.05312.50
5.1.10.0030.03312.50
5.1.00.0030.03012.50
5.0.50.0000.02012.50
5.0.40.0000.02712.50
5.0.30.0030.06012.50
5.0.20.0070.04012.50
5.0.10.0030.04012.50
5.0.00.0030.04312.50
4.4.90.0070.03012.50
4.4.80.0000.03012.50
4.4.70.0070.02712.50
4.4.60.0030.03012.50
4.4.50.0030.03312.50
4.4.40.0000.05312.50
4.4.30.0000.03312.50
4.4.20.0000.02312.50
4.4.10.0070.01012.50
4.4.00.0000.03712.50
4.3.110.0030.03312.50
4.3.100.0000.03712.50
4.3.90.0000.03712.50
4.3.80.0070.03012.50
4.3.70.0000.03312.50
4.3.60.0000.03012.50
4.3.50.0000.03012.50
4.3.40.0000.04012.50
4.3.30.0030.01312.50
4.3.20.0000.02012.50
4.3.10.0000.02012.50
4.3.00.0000.02012.50

preferences:
34.35 ms | 400 KiB | 5 Q