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 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.0030.01714.63
7.3.120.0070.01414.94
7.3.110.0100.01014.90
7.3.100.0030.01014.91
7.3.90.0030.01214.79
7.3.80.0120.00614.79
7.3.70.0120.00614.64
7.3.60.0080.00314.63
7.3.50.0060.00614.80
7.3.40.0030.01314.86
7.3.30.0070.00314.89
7.3.20.0060.01416.72
7.3.10.0070.00816.65
7.3.00.0060.00716.69
7.2.250.0040.01814.76
7.2.240.0060.01214.75
7.2.230.0120.00315.31
7.2.220.0060.01015.03
7.2.210.0140.00015.16
7.2.200.0030.01315.00
7.2.190.0090.00314.92
7.2.180.0000.01615.27
7.2.170.0060.00914.99
7.2.130.0030.01216.71
7.2.120.0080.00816.80
7.2.110.0060.00916.84
7.2.100.0070.01117.09
7.2.90.0070.01017.02
7.2.80.0080.00816.77
7.2.70.0030.01317.02
7.2.60.0000.01016.86
7.2.50.0000.01016.86
7.2.40.0110.00717.06
7.2.30.0100.00317.05
7.2.20.0040.00816.97
7.2.10.0090.00616.94
7.2.00.0060.01118.22
7.1.330.0060.00916.04
7.1.320.0130.00315.90
7.1.310.0060.00615.66
7.1.300.0090.00315.73
7.1.290.0030.01015.86
7.1.280.0100.01015.85
7.1.270.0110.00715.80
7.1.260.0100.01015.86
7.1.250.0090.00915.86
7.1.70.0030.00517.07
7.1.60.0070.02019.21
7.1.50.0100.01617.11
7.1.00.0100.07322.33
7.0.200.0030.00516.76
7.0.140.0070.07322.09
7.0.120.0000.07322.09
7.0.60.0130.07719.96
7.0.50.0070.08317.87
7.0.40.0030.05717.86
7.0.30.0000.09317.76
7.0.20.0130.07717.75
7.0.10.0100.06317.75
7.0.00.0100.08717.77
5.6.280.0070.09321.57
5.6.210.0100.06321.21
5.6.200.0100.04018.66
5.6.190.0130.08018.74
5.6.180.0130.04318.81
5.6.170.0070.08718.63
5.6.160.0000.09018.50
5.6.150.0170.07318.65
5.6.140.0030.09318.65
5.6.130.0030.04718.69
5.6.120.0100.08318.63
5.6.110.0070.08318.50
5.6.100.0030.07018.62
5.6.90.0030.08718.64
5.6.80.0100.08018.05
5.6.70.0070.08018.12
5.6.60.0200.06318.00
5.6.50.0100.08018.05
5.6.40.0030.06317.96
5.6.30.0070.07318.02
5.6.20.0030.05018.09
5.6.10.0070.08717.86
5.6.00.0030.06318.00
5.5.350.0170.04020.86
5.5.340.0100.08018.55
5.5.330.0070.06318.47
5.5.320.0170.07018.45
5.5.310.0030.06718.54
5.5.300.0170.06018.31
5.5.290.0070.05718.45
5.5.280.0070.08318.54
5.5.270.0130.08018.50
5.5.260.0230.06718.47
5.5.250.0100.05018.26
5.5.240.0100.05317.89
5.5.230.0030.06717.83
5.5.220.0030.05017.80
5.5.210.0070.04317.91
5.5.200.0070.08717.77
5.5.190.0070.07017.80
5.5.180.0030.08317.80
5.5.160.0030.08317.79
5.5.150.0000.06017.79
5.5.140.0100.04317.85
5.5.130.0070.06317.80
5.5.120.0000.04717.85
5.5.110.0170.03017.80
5.5.100.0070.04717.73
5.5.90.0100.03317.80
5.5.80.0100.03317.73
5.5.70.0130.03717.71
5.5.60.0070.03317.70
5.5.50.0100.03017.72
5.5.40.0100.03017.70
5.5.30.0070.03717.55
5.5.20.0100.03717.52
5.5.10.0070.04317.67
5.5.00.0030.04017.79
5.4.450.0130.08019.82
5.4.440.0030.09019.82
5.4.430.0030.05319.77
5.4.420.0100.06019.79
5.4.410.0130.04719.68
5.4.400.0030.08019.39
5.4.390.0170.04319.60
5.4.380.0030.04019.49
5.4.370.0000.08319.49
5.4.360.0130.07019.49
5.4.350.0070.08319.40
5.4.340.0170.05019.46
5.4.320.0170.07019.50
5.4.310.0070.07319.52
5.4.300.0070.04019.60
5.4.290.0070.07719.62
5.4.280.0030.05019.60
5.4.270.0030.04319.60
5.4.260.0130.07019.46
5.4.250.0000.04319.41
5.4.240.0000.04319.60
5.4.230.0030.04019.56
5.4.220.0100.03319.58
5.4.210.0030.03719.49
5.4.200.0100.03319.40
5.4.190.0030.03719.48
5.4.180.0100.03319.38
5.4.170.0100.04319.37
5.4.160.0130.06719.46
5.4.150.0100.06019.62
5.4.140.0070.03716.74
5.4.130.0070.03316.84
5.4.120.0030.03716.88
5.4.110.0000.04016.95
5.4.100.0100.03016.96
5.4.90.0070.03316.92
5.4.80.0030.03716.91
5.4.70.0070.03316.89
5.4.60.0030.03316.95
5.4.50.0000.03717.04
5.4.40.0030.03716.92
5.4.30.0130.02716.89
5.4.20.0000.03716.93
5.4.10.0030.03716.88
5.4.00.0000.04016.41
5.3.290.0070.07315.57
5.3.280.0030.04015.50
5.3.270.0070.05015.54
5.3.260.0100.07315.60
5.3.250.0030.07015.51
5.3.240.0070.03715.71
5.3.230.0000.04015.62
5.3.220.0000.04015.55
5.3.210.0000.04715.59
5.3.200.0030.03715.55
5.3.190.0030.03715.57
5.3.180.0070.03315.38
5.3.170.0030.04015.50
5.3.160.0000.04015.54
5.3.150.0030.03715.46
5.3.140.0000.04315.49
5.3.130.0030.03715.49
5.3.120.0070.03715.35
5.3.110.0030.04015.43
5.3.100.0030.03714.95
5.3.90.0030.03715.12
5.3.80.0000.04015.00
5.3.70.0000.04014.93
5.3.60.0000.04014.92
5.3.50.0030.03714.94
5.3.40.0000.04014.89
5.3.30.0000.04014.80
5.3.20.0070.04014.68
5.3.10.0030.04014.57
5.3.00.0000.04014.52
5.2.170.0000.03011.16
5.2.160.0030.02711.19
5.2.150.0030.02711.13
5.2.140.0000.03311.04
5.2.130.0170.05010.95
5.2.120.0100.05711.17
5.2.110.0070.02311.18
5.2.100.0070.04311.14
5.2.90.0070.04711.06
5.2.80.0100.05711.00
5.2.70.0030.04711.30
5.2.60.0030.03011.13
5.2.50.0070.02711.00
5.2.40.0070.05711.01
5.2.30.0070.06011.02
5.2.20.0200.04711.00
5.2.10.0100.06010.96
5.2.00.0070.04010.79
5.1.60.0000.05710.04
5.1.50.0030.0379.99
5.1.40.0070.05010.02
5.1.30.0070.05710.55
5.1.20.0000.03310.42
5.1.10.0000.05010.17
5.1.00.0030.05710.06
5.0.50.0100.0438.61
5.0.40.0100.0378.52
5.0.30.0000.0508.52
5.0.20.0070.0408.52
5.0.10.0070.0438.52
5.0.00.0070.0608.52
4.4.90.0000.0208.52
4.4.80.0070.0108.52
4.4.70.0000.0278.52
4.4.60.0000.0338.52
4.4.50.0070.0338.52
4.4.40.0030.0308.52
4.4.30.0000.0408.52
4.4.20.0000.0438.52
4.4.10.0030.0278.52
4.4.00.0030.0538.52
4.3.110.0000.0308.52
4.3.100.0070.0238.52
4.3.90.0000.0338.52
4.3.80.0000.0308.52
4.3.70.0070.0308.52
4.3.60.0000.0208.52
4.3.50.0000.0338.52
4.3.40.0000.0478.52
4.3.30.0030.0378.52
4.3.20.0000.0238.52
4.3.10.0030.0378.52
4.3.00.0030.0338.52

preferences:
32.49 ms | 401 KiB | 5 Q