3v4l.org

run code in 300+ PHP versions simultaneously
<?php gc_enable(); class test { public $spl; public function __construct() { $this->spl = new ArrayObject(); $this->spl['circular_reference'] = $this; } } $output = ''; $i = 0; while($i < 100) { $time = microtime(1); $test = new test(); unset($test); gc_collect_cycles(); $output .= 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.3.10.0000.01116.07
7.3.00.0140.00316.49
7.2.130.0030.01216.75
7.2.120.0120.00616.96
7.2.110.0130.00316.90
7.2.100.0080.00616.71
7.2.90.0000.01716.94
7.2.80.0070.00416.64
7.2.70.0080.00816.78
7.2.60.0110.00716.63
7.2.50.0040.00816.82
7.2.40.0140.00316.71
7.2.30.0030.00916.81
7.2.20.0120.00016.32
7.2.10.0110.00716.54
7.2.00.0050.00918.12
7.1.250.0110.00715.46
7.1.70.0040.00417.29
7.1.60.0100.01419.29
7.1.50.0100.01316.99
7.1.00.0130.06022.36
7.0.200.0030.00316.84
7.0.140.0000.07721.96
7.0.60.0070.06020.00
7.0.50.0000.04318.04
7.0.40.0100.04020.40
7.0.30.0230.04720.13
7.0.20.0300.06720.08
7.0.10.0300.08020.10
7.0.00.0030.06020.22
5.6.280.0100.06321.07
5.6.210.0070.08020.61
5.6.200.0070.04018.20
5.6.190.0000.04720.48
5.6.180.0030.06320.55
5.6.170.0300.08720.59
5.6.160.0030.06320.44
5.6.150.0070.04318.25
5.6.140.0000.04318.21
5.6.130.0000.04718.17
5.6.120.0100.08721.14
5.6.110.0100.08020.98
5.6.100.0200.05020.96
5.6.90.0070.07320.96
5.6.80.0070.08020.52
5.6.70.0330.05020.37
5.5.350.0130.07320.32
5.5.340.0100.07718.05
5.5.330.0070.06320.30
5.5.320.0100.03320.38
5.5.310.0370.05020.40
5.5.300.0070.04017.97
5.5.290.0100.03718.01
5.5.280.0070.03720.77
5.5.270.0070.04320.79
5.5.260.0070.07720.87
5.5.250.0070.08720.60
5.5.240.0070.04320.14
5.4.450.0900.04319.20
5.4.440.0700.06319.44
5.4.430.0170.05719.47
5.4.420.0730.05019.46
5.4.410.0700.04019.50
5.4.400.0870.05319.16
5.4.390.0630.05719.31
5.4.380.0130.05318.80
5.4.370.0200.05018.84
5.4.360.0100.05718.78
5.4.350.0330.06018.70
5.4.340.0200.04718.57
5.4.320.0050.03912.50
5.4.310.0050.04212.50
5.4.300.0070.03612.51
5.4.290.0060.03912.50
5.4.280.0050.03612.40
5.4.270.0100.04412.40
5.4.260.0090.04212.40
5.4.250.0050.04012.40
5.4.240.0060.03612.39
5.4.230.0060.03812.39
5.4.220.0180.04212.38
5.4.210.0160.04412.37
5.4.200.0170.04712.38
5.4.190.0200.04112.37
5.4.180.0130.05112.37
5.4.170.0190.04412.38
5.4.160.0140.04712.37
5.4.150.0170.04512.37
5.4.140.0190.04012.06
5.4.130.0170.04412.05
5.4.120.0160.04412.00
5.4.110.0170.04112.00
5.4.100.0140.04812.00
5.4.90.0190.04112.00
5.4.80.0180.04311.99
5.4.70.0140.04612.00
5.4.60.0160.04512.00
5.4.50.0170.04311.99
5.4.40.0190.04911.98
5.4.30.0180.04411.98
5.4.20.0200.04011.98
5.4.10.0160.04311.98
5.4.00.0140.04211.47
5.3.290.0070.03912.80
5.3.280.0070.04512.71
5.3.270.0140.04912.72
5.3.260.0230.04212.72
5.3.250.0210.04212.72
5.3.240.0210.04512.72
5.3.230.0220.04612.71
5.3.220.0140.05012.68
5.3.210.0170.04912.68
5.3.200.0240.04812.68
5.3.190.0220.05312.68
5.3.180.0220.04912.67
5.3.170.0200.05112.67
5.3.160.0160.04812.68
5.3.150.0210.04912.67
5.3.140.0200.04412.66
5.3.130.0180.05112.66
5.3.120.0250.04512.66
5.3.110.0270.04512.66
5.3.100.0230.04912.12
5.3.90.0230.04912.10
5.3.80.0170.04812.08
5.3.70.0150.05012.08
5.3.60.0150.05012.06
5.3.50.0220.04512.00
5.3.40.0160.04712.00
5.3.30.0210.04311.98
5.3.20.0160.04811.75
5.3.10.0150.04511.72
5.3.00.0160.04711.70
5.2.170.0130.0369.20
5.2.160.0130.0389.20
5.2.150.0090.0399.20
5.2.140.0160.0339.20
5.2.130.0150.0349.16
5.2.120.0120.0359.16
5.2.110.0130.0399.16
5.2.100.0140.0369.16
5.2.90.0130.0359.16
5.2.80.0140.0369.14
5.2.70.0120.0389.15
5.2.60.0170.0359.11
5.2.50.0190.0329.07
5.2.40.0150.0369.05
5.2.30.0120.0369.02
5.2.20.0360.0769.03
5.2.10.0140.0338.93
5.2.00.0160.0338.77
5.1.60.0130.0308.06
5.1.50.0130.0308.06
5.1.40.0110.0308.05
5.1.30.0130.0338.39
5.1.20.0130.0308.42
5.1.10.0100.0358.14
5.1.00.0160.0298.14
5.0.50.0090.0276.62
5.0.40.0100.0246.48
5.0.30.0100.0356.29
5.0.20.0070.0266.27
5.0.10.0100.0236.24
5.0.00.0130.0376.23
4.4.90.0070.0184.77
4.4.80.0110.0154.75
4.4.70.0080.0204.75
4.4.60.0060.0204.76
4.4.50.0120.0134.77
4.4.40.0100.0274.71
4.4.30.0070.0194.75
4.4.20.0090.0194.85
4.4.10.0080.0204.85
4.4.00.0050.0354.76
4.3.110.0080.0184.67
4.3.100.0060.0214.66
4.3.90.0130.0134.63
4.3.80.0060.0304.58
4.3.70.0070.0194.63
4.3.60.0090.0174.63
4.3.50.0090.0174.63
4.3.40.0100.0254.54
4.3.30.0040.0233.37
4.3.20.0060.0183.37
4.3.10.0040.0193.37
4.3.00.0030.01313.43

preferences:
34.47 ms | 401 KiB | 5 Q