3v4l.org

run code in 300+ PHP versions simultaneously
<?php gc_enable(); class test { public $spl; public function __construct() { $this->spl = new SplPriorityQueue(); $this->spl->insert($this, 1); } } $i = 0; while($i < 500) { $test = new test(); unset($test); gc_collect_cycles(); echo sprintf('%1$04d: ', $i) . number_format(memory_get_usage()) . " B <\br>"; $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.0090.00914.93
7.3.120.0070.01014.70
7.3.110.0030.01615.10
7.3.100.0000.01414.92
7.3.90.0070.01014.66
7.3.80.0070.01014.84
7.3.70.0040.01814.93
7.3.60.0030.01014.48
7.3.50.0060.01014.88
7.3.40.0070.01014.61
7.3.30.0030.01214.85
7.3.20.0030.01316.71
7.3.10.0050.00716.49
7.3.00.0030.01316.30
7.2.250.0030.01415.34
7.2.240.0120.00915.25
7.2.230.0090.01014.98
7.2.220.0130.00615.12
7.2.210.0130.00315.05
7.2.200.0100.01314.77
7.2.190.0060.00615.23
7.2.180.0100.00714.96
7.2.170.0080.00815.14
7.2.130.0140.00716.49
7.2.120.0140.00316.86
7.2.110.0040.01616.71
7.2.100.0170.00916.73
7.2.90.0150.00016.58
7.2.80.0110.01416.90
7.2.70.0200.01016.49
7.2.60.0150.00916.50
7.2.50.0260.00416.89
7.2.40.0110.00716.60
7.2.30.0100.01016.54
7.2.20.0120.00616.86
7.2.10.0090.00916.62
7.2.00.0110.00718.28
7.1.330.0030.01315.57
7.1.320.0080.01115.97
7.1.310.0100.00715.77
7.1.300.0000.01415.86
7.1.290.0070.01315.67
7.1.280.0030.01615.52
7.1.270.0060.00915.85
7.1.260.0100.01015.82
7.1.250.0090.00915.30
7.1.70.0040.01217.27
7.1.60.0060.00617.30
7.1.50.0070.01816.93
7.1.00.0030.03322.57
7.0.200.0040.01116.61
7.0.140.0000.08022.08
7.0.60.0130.07319.92
7.0.50.0170.07317.85
7.0.40.0070.04320.13
7.0.30.0230.08320.23
7.0.20.0200.04720.22
7.0.10.0100.05020.09
7.0.00.0030.09320.07
5.6.210.0100.03721.14
5.6.200.0130.08318.79
5.6.190.0070.04021.05
5.6.180.0170.07021.00
5.6.170.0470.04021.09
5.6.160.0100.06020.89
5.6.150.0070.06018.69
5.6.140.0070.05018.73
5.6.130.0130.07318.73
5.6.120.0070.06721.75
5.6.110.0000.04721.71
5.6.100.0030.04021.74
5.6.90.0130.08021.61
5.6.80.0130.07721.01
5.6.70.0270.08321.13
5.5.350.0070.08720.86
5.5.340.0030.04018.48
5.5.330.0030.05320.77
5.5.320.0470.07320.69
5.5.310.0330.06020.62
5.5.300.0170.05018.44
5.5.290.0170.04318.48
5.5.280.0130.04021.40
5.5.270.0100.03721.38
5.5.260.0100.07021.46
5.5.250.0170.07021.29
5.5.240.0230.05720.67
5.4.450.0670.06019.87
5.4.440.1000.06020.11
5.4.430.1000.07720.29
5.4.420.1230.06719.71
5.4.410.0630.07019.97
5.4.400.0330.07019.54
5.4.390.0400.05719.46
5.4.380.0370.05019.28
5.4.370.0170.05319.38
5.4.360.0070.07019.22
5.4.350.0110.03812.75
5.4.340.0080.04512.75
5.4.320.0090.04613.23
5.4.310.0130.03813.22
5.4.300.0100.03813.23
5.4.290.0110.04113.21
5.4.280.0090.04213.12
5.4.270.0110.04213.12
5.4.260.0060.04613.12
5.4.250.0040.04513.12
5.4.240.0130.06019.46
5.4.230.0030.06319.35
5.4.220.0130.08719.55
5.4.210.0200.06019.35
5.4.200.0100.06019.38
5.4.190.0170.05319.55
5.4.180.0070.06019.59
5.4.170.0100.06019.36
5.4.160.0100.08019.35
5.4.150.0030.06719.46
5.4.140.0170.06017.07
5.4.130.0130.06017.00
5.4.120.0170.08017.06
5.4.110.0230.07016.97
5.4.100.0100.06717.07
5.4.90.0200.06717.04
5.4.80.0130.06017.13
5.4.70.0100.06317.11
5.4.60.0070.06316.96
5.4.50.0070.05717.00
5.4.40.0230.06716.95
5.4.30.0370.04316.96
5.4.20.0070.08317.01
5.4.10.0170.09017.12
5.4.00.0230.05716.48
5.3.290.0070.04813.64
5.3.280.0130.05715.52
5.3.270.0100.06015.63
5.3.260.0100.06715.54
5.3.250.0130.07715.55
5.3.240.0070.06315.63
5.3.230.0170.05015.64
5.3.220.0230.05015.61
5.3.210.0070.06315.58
5.3.200.0130.08015.66
5.3.190.0100.06015.49
5.3.180.0200.05315.63
5.3.170.0170.08015.68
5.3.160.0130.04715.59
5.3.150.0130.05315.51
5.3.140.0130.05315.45
5.3.130.0130.06015.44
5.3.120.0200.05315.59
5.3.110.0130.07315.46
5.3.100.0130.06014.96
5.3.90.0130.08314.95
5.3.80.0170.04714.80
5.3.70.0130.07015.06
5.3.60.0170.05014.79
5.3.50.0070.05314.90
5.3.40.0270.04014.85
5.3.30.0070.07314.70
5.3.20.0070.07714.59
5.3.10.0030.07014.61
5.3.00.0070.05714.60
5.2.170.0030.04311.21
5.2.160.0200.04311.13
5.2.150.0030.06011.23
5.2.140.0030.05011.32
5.2.130.0030.04311.19
5.2.120.0100.04711.16
5.2.110.0100.03310.93
5.2.100.0170.04311.33
5.2.90.0100.03711.01
5.2.80.0100.05711.16
5.2.70.0070.04711.16
5.2.60.0070.04711.11
5.2.50.0070.04311.20
5.2.40.0000.04310.96
5.2.30.0030.04711.06
5.2.20.0030.05310.94
5.2.10.0070.04010.84
5.2.00.0130.05310.79
5.1.60.0100.02710.15
5.1.50.0100.04010.06
5.1.40.0100.0309.90
5.1.30.0100.03010.51
5.1.20.0070.03310.44
5.1.10.0030.04310.21
5.1.00.0070.03710.30
5.0.50.0030.0278.80
5.0.40.0030.0278.80
5.0.30.0030.0408.80
5.0.20.0100.0308.80
5.0.10.0030.0278.80
5.0.00.0030.0438.80
4.4.90.0000.0238.80
4.4.80.0100.0138.80
4.4.70.0030.0208.80
4.4.60.0000.0308.80
4.4.50.0000.0238.80
4.4.40.0070.0308.80
4.4.30.0030.0208.80
4.4.20.0030.0308.80
4.4.10.0070.0208.80
4.4.00.0000.0378.80
4.3.110.0070.0178.80
4.3.100.0000.0238.80
4.3.90.0000.0308.80
4.3.80.0030.0438.80
4.3.70.0030.0208.80
4.3.60.0030.0208.80
4.3.50.0100.0138.80
4.3.40.0030.0478.80
4.3.30.0000.0278.80
4.3.20.0000.0237.46
4.3.10.0030.0307.46
4.3.00.0170.0206.78

preferences:
44.08 ms | 401 KiB | 5 Q