3v4l.org

run code in 300+ PHP versions simultaneously
<?php gc_enable(); class test { public $spl; public function __construct() { $this->spl = 5; } } $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.3.120.0090.00615.15
7.3.110.0130.00314.97
7.3.100.0120.00314.84
7.3.90.0040.00814.88
7.3.80.0100.00314.99
7.3.70.0000.01614.87
7.3.60.0100.00714.86
7.3.50.0130.00314.59
7.3.40.0090.00614.56
7.3.30.0100.00714.80
7.3.20.0070.01116.28
7.3.10.0100.00716.45
7.3.00.0060.00816.73
7.2.240.0080.01214.93
7.2.230.0030.01015.18
7.2.220.0030.01615.15
7.2.210.0000.01414.94
7.2.200.0070.01014.81
7.2.190.0090.00915.04
7.2.180.0040.00814.82
7.2.170.0000.01015.13
7.2.160.0040.01414.73
7.2.150.0030.01016.77
7.2.140.0030.01316.96
7.2.130.0120.00616.96
7.2.120.0070.00717.02
7.2.110.0090.00916.77
7.2.100.0060.00916.87
7.2.90.0100.00716.83
7.2.80.0000.01516.91
7.2.70.0000.01716.98
7.2.60.0030.00916.92
7.2.50.0030.01416.91
7.2.40.0040.01016.99
7.2.30.0000.01716.89
7.2.20.0130.00616.96
7.2.10.0070.01116.74
7.2.00.0060.00718.28
7.1.330.0110.00715.97
7.1.320.0080.00816.00
7.1.310.0040.01215.72
7.1.300.0070.01015.94
7.1.290.0070.01015.79
7.1.280.0040.01115.68
7.1.270.0100.00315.35
7.1.260.0090.00615.91
7.1.250.0000.01515.89
7.1.70.0050.00517.25
7.1.60.0150.00419.32
7.1.50.0270.01034.82
7.1.00.0000.04722.36
7.0.200.0050.00316.86
7.0.140.0100.06721.97
7.0.60.0030.04019.93
7.0.50.0130.05317.95
7.0.40.0200.07320.13
7.0.30.0230.07020.16
7.0.20.0230.06020.21
7.0.10.0100.08320.23
7.0.00.0030.05020.30
5.6.280.0130.06320.86
5.6.210.0170.06320.53
5.6.200.0070.08718.18
5.6.190.0070.09020.64
5.6.180.0330.07720.54
5.6.170.0100.04720.62
5.6.160.0000.04720.47
5.6.150.0130.07318.16
5.6.140.0100.03718.27
5.6.130.0100.07018.17
5.6.120.0070.08020.90
5.6.110.0130.06020.99
5.6.100.0100.08021.01
5.6.90.0000.04721.00
5.6.80.0130.03320.53
5.5.350.0130.06020.45
5.5.340.0100.07317.93
5.5.330.0200.03020.19
5.5.320.0070.08320.25
5.5.310.0330.08020.34
5.5.300.0170.06718.08
5.5.290.0100.07717.94
5.5.280.0200.04020.84
5.5.270.0100.08320.71
5.5.260.0000.06720.68
5.5.250.0130.07020.75
5.5.240.0170.07320.04
5.4.450.0170.03719.71
5.4.440.0130.04019.58
5.4.430.0230.03019.73
5.4.420.0100.04319.70
5.4.410.0170.03719.29
5.4.400.0130.03719.08
5.4.390.0170.03718.89
5.4.380.0100.04319.29
5.4.370.0100.04019.25
5.4.360.0200.03019.15
5.4.350.0130.04719.23
5.4.340.0370.06718.98
5.4.320.0270.06719.07
5.4.310.0230.04319.22
5.4.300.0300.05019.13
5.4.290.0170.06718.94
5.4.280.0300.07019.32
5.4.270.0170.06319.37
5.4.260.0270.04319.15
5.4.250.0270.05319.07
5.4.240.0170.05018.84
5.4.230.0230.03319.21
5.4.220.0200.06319.37
5.4.210.0270.06719.05
5.4.200.0270.07319.28
5.4.190.0170.08319.13
5.4.180.0200.08019.02
5.4.170.0230.07719.02
5.4.160.0170.05318.93
5.4.150.0230.07018.83
5.4.140.0170.06016.48
5.4.130.0170.05016.40
5.4.120.0200.03316.43
5.4.110.0230.07016.27
5.4.100.0130.04016.46
5.4.90.0200.03316.36
5.4.80.0270.06316.23
5.4.70.0430.02716.59
5.4.60.0230.04716.52
5.4.50.0200.05016.54
5.4.40.0300.05716.53
5.4.30.0270.07016.38
5.4.20.0200.07016.24
5.4.10.0270.04016.43
5.4.00.0230.04315.88
5.3.290.0130.04014.70
5.3.280.0070.05714.58
5.3.270.0170.05714.66
5.3.260.0170.07014.70
5.3.250.0230.06014.76
5.3.240.0270.06714.67
5.3.230.0230.03314.56
5.3.220.0270.07014.64
5.3.210.0270.07314.55
5.3.200.0270.05714.54
5.3.190.0230.04714.57
5.3.180.0200.08014.55
5.3.170.0270.04314.53
5.3.160.0270.07314.59
5.3.150.0300.06314.52
5.3.140.0200.03714.66
5.3.130.0270.07314.53
5.3.120.0230.04714.52
5.3.110.0200.06014.55
5.3.100.0170.08014.01
5.3.90.0330.06013.99
5.3.80.0230.07013.93
5.3.70.0230.06314.04
5.3.60.0300.04313.91
5.3.50.0230.07014.04
5.3.40.0130.04013.95
5.3.30.0230.06713.81
5.3.20.0130.07313.59
5.3.10.0200.06713.58
5.3.00.0170.07013.56
5.2.170.0270.05013.48
5.2.160.0100.05313.48
5.2.150.0170.04313.48
5.2.140.0100.04713.48
5.2.130.0170.04713.48
5.2.120.0100.04013.48
5.2.110.0130.03713.48
5.2.100.0230.03013.48
5.2.90.0200.04713.48
5.2.80.0100.05013.48
5.2.70.0200.06313.48
5.2.60.0200.05713.48
5.2.50.0200.06013.48
5.2.40.0230.03713.48
5.2.30.0100.03313.48
5.2.20.0170.06313.48
5.2.10.0200.05313.48
5.2.00.0170.03313.48
5.1.60.0170.04313.48
5.1.50.0200.04713.48
5.1.40.0270.04013.48
5.1.30.0130.04013.48
5.1.20.0200.05313.48
5.1.10.0130.05013.48
5.1.00.0170.02313.48
5.0.50.0100.04713.48
5.0.40.0100.03013.48
5.0.30.0130.05713.48
5.0.20.0070.04313.48
5.0.10.0070.02713.48
5.0.00.0100.06313.48
4.4.90.0070.03013.48
4.4.80.0070.03713.48
4.4.70.0070.03313.48
4.4.60.0070.02713.48
4.4.50.0030.02313.48
4.4.40.0070.03013.48
4.4.30.0100.03313.48
4.4.20.0130.03013.48
4.4.10.0030.03313.48
4.4.00.0070.04713.48
4.3.110.0130.03013.48
4.3.100.0030.04013.48
4.3.90.0030.03313.48
4.3.80.0100.05013.48
4.3.70.0100.03313.48
4.3.60.0070.03013.48
4.3.50.0070.03713.48
4.3.40.0100.03313.48
4.3.30.0000.03013.48
4.3.20.0030.03713.48
4.3.10.0100.03313.48
4.3.00.0030.04013.48

preferences:
36.07 ms | 401 KiB | 5 Q