3v4l.org

run code in 300+ PHP versions simultaneously
<? class ListᐸTᐳ { private $items = []; public function add(T $item): { $this->items[] = $item; } } $list = new Listᐸstringᐳ(); $list->add('Foo');

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)
8.3.40.0110.00418.52
8.3.30.0060.00918.46
8.3.20.0070.00020.12
8.3.10.0050.00323.51
8.3.00.0040.00417.61
8.2.170.0120.00322.96
8.2.160.0100.00320.35
8.2.150.0040.00424.18
8.2.140.0050.00324.66
8.2.130.0080.00021.12
8.2.120.0080.00026.35
8.2.110.0100.01022.24
8.2.100.0090.00318.16
8.2.90.0030.00718.16
8.2.80.0030.00618.04
8.2.70.0040.00417.80
8.2.60.0040.00418.09
8.2.50.0080.00018.10
8.2.40.0070.00022.34
8.2.30.0000.00920.82
8.2.20.0040.00717.96
8.2.10.0040.00417.95
8.2.00.0030.00517.82
8.1.270.0080.00022.18
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0000.01022.17
8.1.230.0070.00320.88
8.1.220.0040.00417.74
8.1.210.0080.00018.77
8.1.200.0030.00617.23
8.1.190.0080.00017.00
8.1.180.0000.00818.10
8.1.170.0000.00918.84
8.1.160.0000.00818.92
8.1.150.0070.00018.80
8.1.140.0070.00019.36
8.1.130.0040.00418.65
8.1.120.0030.00317.30
8.1.110.0030.00717.33
8.1.100.0040.00417.34
8.1.90.0000.00717.31
8.1.80.0000.00717.27
8.1.70.0040.00417.20
8.1.60.0000.00917.45
8.1.50.0000.00817.36
8.1.40.0000.00817.35
8.1.30.0080.00017.44
8.1.20.0050.00217.44
8.1.10.0060.00317.41
8.1.00.0000.00817.39
8.0.300.0040.00421.57
8.0.290.0080.00016.75
8.0.280.0040.00418.37
8.0.270.0070.00017.24
8.0.260.0080.00016.80
8.0.250.0000.00716.82
8.0.240.0000.00716.89
8.0.230.0040.00416.75
8.0.220.0070.00016.66
8.0.210.0000.00616.62
8.0.200.0040.00416.80
8.0.190.0030.00616.78
8.0.180.0070.00016.68
8.0.170.0000.00716.69
8.0.160.0000.00716.69
8.0.150.0000.00716.59
8.0.140.0000.00716.62
8.0.130.0000.00613.40
8.0.120.0050.00316.69
8.0.110.0030.00316.60
8.0.100.0050.00216.60
8.0.90.0000.00716.62
8.0.80.0060.00916.79
8.0.70.0030.00316.62
8.0.60.0000.00716.73
8.0.50.0070.00016.60
8.0.30.0120.00516.95
8.0.20.0100.00817.40
8.0.10.0030.00316.68
8.0.00.0080.01316.75
7.4.330.0000.00615.55
7.4.320.0000.00616.36
7.4.300.0030.00316.46
7.4.290.0020.00516.25
7.4.280.0030.00516.45
7.4.270.0000.00616.39
7.4.260.0050.00216.33
7.4.250.0060.00316.34
7.4.240.0070.00016.36
7.4.230.0020.00516.22
7.4.220.0080.01416.46
7.4.210.0090.00916.49
7.4.200.0070.00016.25
7.4.160.0080.01016.43
7.4.150.0170.00017.40
7.4.140.0130.00917.86
7.4.130.0170.00016.37
7.4.120.0130.00816.28
7.4.110.0080.00816.54
7.4.100.0030.01516.40
7.4.90.0040.01316.25
7.4.80.0060.01219.39
7.4.70.0070.01016.43
7.4.60.0000.01516.35
7.4.50.0000.01416.44
7.4.40.0080.00816.44
7.4.30.0160.00316.32
7.3.330.0000.00613.19
7.3.320.0000.00513.13
7.3.310.0030.00315.95
7.3.300.0020.00516.07
7.3.290.0030.01016.10
7.3.280.0080.00816.11
7.3.270.0130.00717.40
7.3.260.0100.00716.30
7.3.250.0110.01016.25
7.3.240.0110.00616.18
7.3.230.0040.01416.23
7.3.210.0100.00716.25
7.3.200.0030.01316.10
7.3.190.0170.00016.17
7.3.180.0070.01316.42
7.3.170.0100.00716.14
7.3.160.0080.00816.07
7.2.330.0080.00816.29
7.2.320.0180.00016.59
7.2.310.0080.00816.57
7.2.300.0070.01116.42
7.2.290.0100.00616.48
7.1.70.0050.00917.09
7.1.60.0190.01634.93
7.1.50.0240.01034.73
7.1.40.0160.01334.32
7.1.30.0160.01234.38
7.1.20.0260.00934.39
7.1.10.0170.00016.28
7.1.00.0090.00916.63
7.0.200.0030.01216.30
7.0.190.0030.01216.61
7.0.180.0000.01415.84
7.0.170.0030.01316.11
7.0.160.0060.00916.08
7.0.150.0030.01316.09
7.0.140.0000.01616.19
7.0.130.0070.01016.26
7.0.120.0060.01116.26
7.0.110.0080.00816.09
7.0.100.0060.00916.24
7.0.90.0000.01716.27
7.0.80.0030.01316.11
7.0.70.0030.01316.00
7.0.60.0000.01615.88
7.0.50.0030.01316.08
7.0.40.0130.00316.21
7.0.30.0070.00916.37
7.0.20.0040.01216.27
7.0.10.0080.01016.25
7.0.00.0110.00616.30

preferences:
42.53 ms | 400 KiB | 5 Q