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.10.0080.00914.60
7.4.00.0070.01115.17
7.3.130.0120.00915.09
7.3.120.0090.01114.89
7.3.110.0080.01215.03
7.3.100.0050.01314.72
7.3.90.0090.00815.04
7.3.80.0120.00814.84
7.3.70.0030.01214.77
7.3.60.0090.00814.56
7.3.50.0040.01314.86
7.3.40.0120.00514.72
7.3.30.0030.01614.87
7.3.20.0050.01216.46
7.3.10.0050.01116.73
7.3.00.0130.00316.58
7.2.260.0030.01615.27
7.2.250.0030.02014.74
7.2.240.0050.01415.14
7.2.230.0050.01414.82
7.2.220.0090.00715.29
7.2.210.0080.00914.99
7.2.200.0070.00715.20
7.2.190.0100.00515.10
7.2.180.0040.01014.94
7.2.170.0050.01215.04
7.2.160.0110.00514.98
7.2.150.0090.00916.98
7.2.140.0040.01416.96
7.2.130.0070.01216.83
7.2.120.0070.00717.03
7.2.110.0050.01416.83
7.2.100.0060.01016.95
7.2.90.0080.00516.94
7.2.80.0070.01016.90
7.2.70.0050.01016.98
7.2.60.0050.01316.94
7.2.50.0060.01316.92
7.2.40.0060.01016.96
7.2.30.0020.01516.90
7.2.20.0050.01117.00
7.2.10.0020.01516.92
7.2.00.0070.01117.78
7.1.330.0060.00915.64
7.1.320.0060.01015.97
7.1.310.0070.00815.86
7.1.300.0070.01015.72
7.1.290.0070.01115.82
7.1.280.0100.00715.77
7.1.270.0050.01115.75
7.1.260.0050.01215.76
7.1.250.0120.00515.85
7.1.240.0070.00715.86
7.1.230.0030.01315.89
7.1.220.0170.00315.93
7.1.210.0030.01015.74
7.1.200.0030.01315.76
7.1.190.0060.00915.90
7.1.180.0030.01315.82
7.1.170.0090.01215.74
7.1.160.0040.00715.55
7.1.150.0030.01515.82
7.1.140.0070.00715.89
7.1.130.0000.01615.58
7.1.120.0000.01215.80
7.1.110.0030.00915.63
7.1.100.0080.00416.07
7.1.90.0120.00315.90
7.1.80.0140.00415.81
7.1.70.0010.01316.45
7.1.60.0070.01517.61
7.1.50.0060.00716.35
7.1.40.0100.00715.61
7.1.30.0030.01415.70
7.1.20.0070.01015.82
7.1.10.0030.01315.92
7.1.00.0030.02419.17
7.0.330.0000.01715.45
7.0.320.0070.01015.54
7.0.310.0090.00615.40
7.0.300.0100.00715.11
7.0.290.0120.00315.39
7.0.280.0100.00315.19
7.0.270.0090.00915.57
7.0.260.0000.01615.34
7.0.250.0060.00615.59
7.0.240.0100.00315.31
7.0.230.0060.00915.58
7.0.220.0090.00915.22
7.0.210.0030.01015.45
7.0.200.0030.00716.07
7.0.190.0120.00015.24
7.0.180.0040.00815.26
7.0.170.0080.00815.21
7.0.160.0100.00615.21
7.0.150.0070.00415.54
7.0.140.0030.04218.85
7.0.130.0060.00615.50
7.0.120.0030.00615.22
7.0.110.0110.00715.53
7.0.100.0100.03717.77
7.0.90.0100.03517.52
7.0.80.0070.04517.79
7.0.70.0230.02517.70
7.0.60.0220.04317.67
7.0.50.0270.03817.87
7.0.40.0110.02816.85
7.0.30.0100.04216.69
7.0.20.0130.03816.83
7.0.10.0030.04216.62
7.0.00.0060.04416.75
5.6.400.0000.01914.92
5.6.390.0040.01114.90
5.6.380.0070.01014.75
5.6.370.0070.01115.00
5.6.360.0030.01014.59
5.6.350.0030.01615.34
5.6.340.0030.01314.57
5.6.330.0080.00814.83
5.6.320.0030.01415.09
5.6.310.0090.00614.90
5.6.300.0030.01114.90
5.6.290.0090.00914.73
5.6.280.0070.04018.28
5.6.270.0090.00614.91
5.6.260.0130.00314.90
5.6.250.0120.03217.98
5.6.240.0140.03818.12
5.6.230.0050.04318.22
5.6.220.0080.03818.04
5.6.210.0080.05118.13
5.6.200.0130.03318.22
5.6.190.0020.05018.18
5.6.180.0080.03818.25
5.6.170.0110.02618.29
5.6.160.0120.02718.13
5.6.150.0050.05018.32
5.6.140.0030.02618.13
5.6.130.0080.04218.36
5.6.120.0030.05018.23
5.6.110.0100.04518.17
5.6.100.0110.04718.29
5.6.90.0100.04718.19
5.6.80.0130.04017.80
5.6.70.0070.03017.81
5.6.60.0100.04617.81
5.6.50.0080.04718.12
5.6.40.0030.04017.78
5.6.30.0080.03817.97
5.6.20.0080.02917.87
5.6.10.0070.04517.85
5.6.00.0050.04617.89
5.5.380.0050.03117.80
5.5.370.0050.02417.90
5.5.360.0120.03317.87
5.5.350.0090.04017.91
5.5.340.0070.04518.31
5.5.330.0100.04517.93
5.5.320.0140.04018.23
5.5.310.0150.03718.27
5.5.300.0080.04318.07
5.5.290.0050.02518.12
5.5.280.0150.04018.17
5.5.270.0050.04518.11
5.5.260.0080.04517.96
5.5.250.0120.04017.96
5.5.240.0100.03817.74
5.5.230.0090.02517.76
5.5.220.0100.04117.79
5.5.210.0050.03117.61
5.5.200.0090.02517.73
5.5.190.0060.04217.68
5.5.180.0070.04717.72
5.5.170.0090.00614.77
5.5.160.0060.04517.64
5.5.150.0040.03117.84
5.5.140.0050.04617.63
5.5.130.0110.04517.76
5.5.120.0070.02917.63
5.5.110.0020.03817.62
5.5.100.0070.04217.50
5.5.90.0080.04517.58
5.5.80.0050.03717.75
5.5.70.0100.03717.60
5.5.60.0050.04817.52
5.5.50.0070.02717.71
5.5.40.0070.04217.71
5.5.30.0080.03117.57
5.5.20.0100.03217.52
5.5.10.0070.03017.72
5.5.00.0070.04717.65
5.4.450.0080.04315.93
5.4.440.0080.02915.86
5.4.430.0060.05015.80
5.4.420.0050.04215.92
5.4.410.0120.04015.80
5.4.400.0080.02815.66
5.4.390.0070.02515.69
5.4.380.0070.04315.69
5.4.370.0050.04615.71
5.4.360.0120.03715.74
5.4.350.0050.04815.70
5.4.340.0050.04215.70
5.4.330.0030.01411.84
5.4.320.0020.03415.74
5.4.310.0070.03715.76
5.4.300.0120.03715.69
5.4.290.0100.03515.64
5.4.280.0020.03315.70
5.4.270.0100.03915.71
5.4.260.0080.03815.68
5.4.250.0090.02215.71
5.4.240.0030.04815.77
5.4.230.0050.03615.68
5.4.220.0100.03615.66
5.4.210.0090.03115.70
5.4.200.0080.03815.65
5.4.190.0150.03215.75
5.4.180.0020.04415.73
5.4.170.0020.04915.71
5.4.160.0070.02915.73
5.4.150.0050.04715.75
5.4.140.0080.03514.39
5.4.130.0050.04314.34
5.4.120.0070.04314.35
5.4.110.0030.03114.47
5.4.100.0090.03914.46
5.4.90.0120.03514.44
5.4.80.0030.03914.41
5.4.70.0100.03714.47
5.4.60.0050.03914.47
5.4.50.0080.04014.44
5.4.40.0070.04014.37
5.4.30.0030.04514.44
5.4.20.0040.03914.37
5.4.10.0120.03514.41
5.4.00.0050.03914.14
5.3.290.0120.04013.72
5.3.280.0080.03913.72
5.3.270.0020.04713.70
5.3.260.0020.03613.67
5.3.250.0030.05013.73
5.3.240.0130.03813.67
5.3.230.0070.04213.67
5.3.220.0050.04413.71
5.3.210.0110.03813.66
5.3.200.0080.03613.72
5.3.190.0080.04513.66
5.3.180.0060.04113.71
5.3.170.0050.03213.64
5.3.160.0070.03313.66
5.3.150.0070.03713.68
5.3.140.0030.03613.66
5.3.130.0070.04313.65
5.3.120.0050.04413.69
5.3.110.0050.04213.67
5.3.100.0100.03813.44
5.3.90.0060.02613.40
5.3.80.0080.04013.43
5.3.70.0110.03713.44
5.3.60.0070.04313.31
5.3.50.0110.03613.33
5.3.40.0070.02713.41
5.3.30.0090.04113.37
5.3.20.0070.04313.17
5.3.10.0050.04213.25
5.3.00.0070.04113.19
5.2.170.0030.03711.18
5.2.160.0070.06711.05
5.2.150.0070.06011.15
5.2.140.0000.05011.07
5.2.130.0000.06311.09
5.2.120.0000.04711.17
5.2.110.0070.05311.19
5.2.100.0030.03311.24
5.2.90.0030.06010.96
5.2.80.0100.06311.12
5.2.70.0030.03711.00
5.2.60.0100.06011.10
5.2.50.0070.03011.02
5.2.40.0070.06010.91
5.2.30.0070.06710.90
5.2.20.0030.06010.90
5.2.10.0030.05310.97
5.2.00.0070.06310.78
5.1.60.0070.04310.11
5.1.50.0070.03310.05
5.1.40.0030.0509.81
5.1.30.0030.06010.40
5.1.20.0070.05010.27
5.1.10.0000.04310.14
5.1.00.0000.03310.08
5.0.50.0030.0378.63
5.0.40.0030.0308.47
5.0.30.0000.0338.24
5.0.20.0000.0338.04
5.0.10.0030.0278.20
5.0.00.0030.0638.27
4.4.90.0030.0338.04
4.4.80.0000.0278.04
4.4.70.0030.0338.04
4.4.60.0030.0238.04
4.4.50.0030.0308.04
4.4.40.0000.0578.04
4.4.30.0000.0178.04
4.4.20.0000.0338.04
4.4.10.0000.0378.04
4.4.00.0100.0408.04
4.3.110.0030.0278.04
4.3.100.0030.0278.04
4.3.90.0030.0178.04
4.3.80.0000.0438.04
4.3.70.0000.0408.04
4.3.60.0000.0208.04
4.3.50.0000.0178.04
4.3.40.0000.0278.04
4.3.30.0000.0238.04
4.3.20.0000.0178.04
4.3.10.0000.0208.04
4.3.00.0030.0338.04

preferences:
39.31 ms | 401 KiB | 5 Q