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); } } $output = ''; $i = 0; while($i < 100) { $time = microtime(1); $test = new test(); unset($test); gc_collect_cycles(); $ouput .= sprintf('%1$04d: ', $i) . number_format(memory_get_usage()) . " B\n"; $i++; } echo $output;

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.03
7.3.120.0070.01415.02
7.3.110.0060.01215.09
7.3.100.0070.01015.03
7.3.90.0030.00615.13
7.3.80.0100.00614.76
7.3.70.0030.00614.78
7.3.60.0090.00915.02
7.3.50.0100.00315.11
7.3.40.0060.00614.96
7.3.30.0070.01015.00
7.3.20.0030.00916.75
7.3.10.0060.00616.75
7.3.00.0100.00316.61
7.2.250.0030.01315.37
7.2.240.0030.01615.36
7.2.230.0090.00315.07
7.2.220.0100.00714.88
7.2.210.0070.01115.32
7.2.200.0080.00415.18
7.2.190.0040.01215.16
7.2.180.0000.01115.13
7.2.170.0070.01015.05
7.2.160.0100.00714.98
7.2.150.0050.00516.93
7.2.140.0040.01116.94
7.2.130.0080.00817.05
7.2.120.0060.01016.95
7.2.110.0040.01516.86
7.2.100.0070.00717.07
7.2.90.0090.00616.68
7.2.80.0090.00616.97
7.2.70.0040.01516.86
7.2.60.0070.01017.09
7.2.50.0040.01116.78
7.2.40.0120.00316.85
7.2.30.0040.01417.00
7.2.20.0080.00616.96
7.2.10.0000.01417.03
7.2.00.0000.01516.95
7.1.330.0030.01615.84
7.1.320.0030.01215.60
7.1.310.0080.00515.80
7.1.300.0070.00715.71
7.1.290.0070.00815.57
7.1.280.0070.00316.02
7.1.270.0030.01315.76
7.1.260.0070.00415.81
7.1.250.0030.01315.74
7.1.240.0100.01015.77
7.1.230.0110.00715.82
7.1.220.0030.00915.78
7.1.210.0080.00815.90
7.1.200.0070.00715.64
7.1.190.0060.00915.63
7.1.180.0040.01115.96
7.1.170.0070.00715.71
7.1.160.0090.00315.71
7.1.150.0070.00715.76
7.1.140.0090.00615.95
7.1.130.0090.00615.86
7.1.120.0040.01216.05
7.1.110.0110.00315.83
7.1.100.0110.00415.78
7.1.90.0060.00915.66
7.1.80.0030.01415.48
7.1.70.0020.00816.53
7.1.60.0090.00717.53
7.1.50.0070.00916.27
7.1.40.0030.01015.93
7.1.30.0000.01115.82
7.1.20.0090.00615.87
7.1.10.0000.01315.72
7.1.00.0020.02719.19
7.0.330.0110.00715.53
7.0.320.0000.01415.52
7.0.310.0080.00415.44
7.0.300.0030.00615.43
7.0.290.0060.00615.40
7.0.280.0040.00815.42
7.0.270.0060.00615.34
7.0.260.0060.00315.43
7.0.250.0030.00615.45
7.0.240.0090.00915.58
7.0.230.0080.00315.18
7.0.220.0030.01315.47
7.0.210.0040.01115.36
7.0.200.0000.00916.15
7.0.190.0030.00615.52
7.0.180.0080.00815.25
7.0.170.0100.00315.22
7.0.160.0110.00315.40
7.0.150.0030.00815.55
7.0.140.0050.04018.78
7.0.130.0030.00715.59
7.0.120.0040.00815.54
7.0.110.0070.00715.54
7.0.100.0120.00315.57
7.0.90.0000.01415.57
7.0.80.0050.00515.57
7.0.70.0040.01115.34
7.0.60.0070.04918.67
7.0.50.0030.03116.81
7.0.40.0070.04716.88
7.0.30.0140.02516.71
7.0.20.0150.02416.81
7.0.10.0010.03116.87
7.0.00.0100.03816.82
5.6.400.0060.00914.92
5.6.390.0120.00614.73
5.6.380.0050.00814.44
5.6.370.0030.01314.36
5.6.360.0080.00814.56
5.6.350.0130.00314.48
5.6.340.0070.00714.58
5.6.330.0090.00614.31
5.6.320.0030.00914.73
5.6.310.0030.01314.71
5.6.300.0100.00614.61
5.6.290.0000.01514.73
5.6.280.0080.00414.52
5.6.270.0070.01014.98
5.6.260.0060.00914.24
5.6.250.0030.01214.77
5.6.240.0080.00614.47
5.6.230.0100.00314.49
5.6.220.0120.00314.68
5.6.210.0100.04417.60
5.6.200.0050.02616.35
5.6.190.0070.04717.63
5.6.180.0250.04017.48
5.6.170.0080.02717.42
5.6.160.0090.01817.63
5.6.150.0050.03516.38
5.6.140.0030.03816.49
5.6.130.0040.03916.49
5.6.120.0060.02517.86
5.6.110.0130.03417.89
5.6.100.0050.04417.79
5.6.90.0080.04017.74
5.6.80.0100.03617.46
5.6.70.0070.00714.69
5.6.60.0030.00914.30
5.6.50.0040.01114.41
5.6.40.0100.00614.18
5.6.30.0030.01214.62
5.6.20.0100.00714.34
5.6.10.0040.01114.10
5.6.00.0090.00314.32
5.5.380.0000.01214.28
5.5.370.0030.01014.63
5.5.360.0130.00014.73
5.5.350.0110.03817.37
5.5.340.0020.03816.19
5.5.330.0060.04317.31
5.5.320.0150.04417.60
5.5.310.0160.03817.21
5.5.300.0100.04216.33
5.5.290.0120.04016.28
5.5.280.0050.02717.63
5.5.270.0050.02517.73
5.5.260.0050.05017.78
5.5.250.0080.04217.51
5.5.240.0050.05217.28
5.5.230.0060.00614.14
5.5.220.0040.01114.15
5.5.210.0000.01414.38
5.5.200.0100.00714.51
5.5.190.0070.01014.57
5.5.180.0000.01314.50
5.5.170.0070.01014.22
5.5.160.0030.00914.29
5.5.150.0040.01114.29
5.5.140.0080.00414.54
5.5.130.0030.01214.22
5.5.120.0040.01214.57
5.5.110.0030.01014.25
5.5.100.0030.01014.65
5.5.90.0000.01514.60
5.5.80.0030.01014.53
5.5.70.0040.01414.43
5.5.60.0030.01014.21
5.5.50.0070.00714.23
5.5.40.0030.00914.49
5.5.30.0000.01414.42
5.5.20.0120.00314.49
5.5.10.0040.01114.54
5.5.00.0060.00914.55
5.4.450.0130.04015.57
5.4.440.0190.02615.28
5.4.430.0150.02515.31
5.4.420.0120.04015.43
5.4.410.0150.03115.22
5.4.400.0150.03315.05
5.4.390.0130.02015.36
5.4.380.0190.01615.10
5.4.370.0110.02515.15
5.4.360.0130.04215.03
5.4.350.0170.03715.14
5.4.340.0200.03914.99
5.4.330.0030.01011.13
5.4.320.0150.03215.24
5.4.310.0150.03615.26
5.4.300.0130.03115.28
5.4.290.0180.02515.31
5.4.280.0110.02815.23
5.4.270.0150.04115.04
5.4.260.0170.03515.31
5.4.250.0220.03314.91
5.4.240.0150.02615.20
5.4.230.0190.02215.15
5.4.220.0180.04015.10
5.4.210.0170.03315.25
5.4.200.0170.02915.24
5.4.190.0130.03914.95
5.4.180.0130.03315.08
5.4.170.0210.03015.03
5.4.160.0170.02715.06
5.4.150.0170.02215.11
5.4.140.0150.03413.87
5.4.130.0180.03513.84
5.4.120.0200.03513.80
5.4.110.0170.04213.83
5.4.100.0190.03213.81
5.4.90.0170.02513.92
5.4.80.0190.03413.82
5.4.70.0130.02913.90
5.4.60.0180.03613.93
5.4.50.0160.02513.89
5.4.40.0160.02113.93
5.4.30.0150.02613.74
5.4.20.0200.03513.74
5.4.10.0180.02813.84
5.4.00.0200.03013.59
5.3.290.0130.03712.95
5.3.280.0170.03712.80
5.3.270.0170.03413.00
5.3.260.0150.02012.96
5.3.250.0170.03112.83
5.3.240.0210.02212.77
5.3.230.0200.02212.81
5.3.220.0260.02412.83
5.3.210.0160.03012.84
5.3.200.0170.03912.71
5.3.190.0170.02312.81
5.3.180.0180.03212.92
5.3.170.0150.02812.83
5.3.160.0130.03512.98
5.3.150.0200.02512.66
5.3.140.0190.03912.71
5.3.130.0160.03512.83
5.3.120.0130.04412.76
5.3.110.0150.03912.85
5.3.100.0220.03512.61
5.3.90.0170.03212.44
5.3.80.0220.03212.43
5.3.70.0170.02112.48
5.3.60.0180.03712.38
5.3.50.0150.03112.41
5.3.40.0150.03612.54
5.3.30.0130.03712.47
5.3.20.0200.03312.30
5.3.10.0150.03512.07
5.3.00.0150.03212.02
5.2.170.0200.03311.31
5.2.160.0270.05311.18
5.2.150.0200.05711.20
5.2.140.0200.05311.13
5.2.130.0230.04311.12
5.2.120.0170.03711.07
5.2.110.0200.03010.99
5.2.100.0270.03011.16
5.2.90.0200.04710.98
5.2.80.0200.05011.02
5.2.70.0270.05711.13
5.2.60.0230.05011.08
5.2.50.0270.05310.91
5.2.40.0200.05310.96
5.2.30.0200.04310.96
5.2.20.0270.05010.91
5.2.10.0170.06010.74
5.2.00.0230.03310.77
5.1.60.0170.0339.90
5.1.50.0130.0309.99
5.1.40.0170.05310.12
5.1.30.0170.04710.34
5.1.20.0170.04710.41
5.1.10.0200.0309.98
5.1.00.0200.04010.23
5.0.50.0100.0278.68
5.0.40.0130.0438.68
5.0.30.0030.0578.68
5.0.20.0170.0278.68
5.0.10.0130.0378.68
5.0.00.0030.0578.68
4.4.90.0170.0338.68
4.4.80.0100.0338.68
4.4.70.0070.0308.68
4.4.60.0100.0238.68
4.4.50.0130.0308.68
4.4.40.0070.0308.68
4.4.30.0170.0238.68
4.4.20.0100.0178.68
4.4.10.0070.0208.68
4.4.00.0130.0378.68
4.3.110.0070.0278.68
4.3.100.0100.0378.68
4.3.90.0100.0378.68
4.3.80.0030.0438.68
4.3.70.0030.0308.68
4.3.60.0130.0208.68
4.3.50.0070.0208.68
4.3.40.0130.0378.68
4.3.30.0130.0278.68
4.3.20.0030.0378.68
4.3.10.0030.0378.68
4.3.00.0000.0278.68

preferences:
31.93 ms | 401 KiB | 5 Q