3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Wagon {} class Train { public function __construct(array $wagons) { $this->wagons = (function (Wagon ...$wagons) { return $wagons; })->__invoke(...$wagons); } } var_dump(new Train([new Wagon, new Wagon, new Wagon]));

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.0000.01518.82
8.3.30.0100.00318.69
8.3.20.0070.00020.25
8.3.10.0040.00423.40
8.3.00.0040.00419.96
8.2.170.0070.01522.96
8.2.160.0110.00320.39
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0040.00419.31
8.2.120.0080.00026.35
8.2.110.0080.00020.39
8.2.100.0030.00918.03
8.2.90.0040.00419.26
8.2.80.0030.00617.97
8.2.70.0070.00317.63
8.2.60.0030.00517.80
8.2.50.0060.00318.07
8.2.40.0050.00321.03
8.2.30.0000.00820.68
8.2.20.0040.00417.57
8.2.10.0000.00818.12
8.2.00.0080.00018.12
8.1.270.0040.00419.00
8.1.260.0000.00728.09
8.1.250.0040.00428.09
8.1.240.0050.00322.18
8.1.230.0050.00517.76
8.1.220.0000.00817.74
8.1.210.0000.00818.77
8.1.200.0030.00617.23
8.1.190.0000.00817.23
8.1.180.0000.00818.10
8.1.170.0090.00018.41
8.1.160.0000.00720.77
8.1.150.0040.00418.84
8.1.140.0080.00019.52
8.1.130.0070.00017.57
8.1.120.0040.00417.50
8.1.110.0000.00817.50
8.1.100.0030.00517.38
8.1.90.0000.00817.53
8.1.80.0000.00817.39
8.1.70.0000.00717.34
8.1.60.0030.00617.52
8.1.50.0050.00317.50
8.1.40.0000.00817.57
8.1.30.0000.00817.65
8.1.20.0050.00317.62
8.1.10.0040.00417.52
8.1.00.0000.00717.54
8.0.300.0030.00618.77
8.0.290.0000.00716.75
8.0.280.0000.00718.47
8.0.270.0030.00517.35
8.0.260.0060.00017.23
8.0.250.0000.00616.96
8.0.240.0000.00816.90
8.0.230.0000.01016.93
8.0.220.0070.00016.92
8.0.210.0100.00016.93
8.0.200.0030.00316.93
8.0.190.0000.00816.96
8.0.180.0050.00516.82
8.0.170.0000.00816.96
8.0.160.0080.00016.89
8.0.150.0050.00216.80
8.0.140.0070.00016.90
8.0.130.0050.00013.38
8.0.120.0050.00316.80
8.0.110.0050.00216.88
8.0.100.0000.00716.81
8.0.90.0070.00016.90
8.0.80.0090.00616.87
8.0.70.0000.00716.97
8.0.60.0050.00316.78
8.0.50.0070.00016.91
8.0.30.0110.00717.18
8.0.20.0120.00717.40
8.0.10.0050.00317.07
8.0.00.0110.00716.86
7.4.330.0050.00016.81
7.4.320.0070.00016.49
7.4.300.0000.00716.53
7.4.290.0000.00816.56
7.4.280.0050.00316.50
7.4.270.0030.00516.61
7.4.260.0000.00716.40
7.4.250.0000.00816.58
7.4.240.0020.00616.57
7.4.230.0030.00316.56
7.4.220.0070.01116.47
7.4.210.0050.00916.45
7.4.200.0070.00016.43
7.4.160.0060.01516.47
7.4.150.0110.00717.40
7.4.140.0120.01317.86
7.4.130.0100.00716.40
7.4.120.0100.00716.61
7.4.110.0090.00916.59
7.4.100.0030.01316.38
7.4.90.0130.00816.62
7.4.80.0140.00319.39
7.4.70.0100.00616.42
7.4.60.0100.00716.49
7.4.50.0130.00716.52
7.4.40.0100.01016.27
7.4.30.0110.00816.46
7.4.00.0080.00815.18
7.3.330.0050.00313.05
7.3.320.0050.00013.29
7.3.310.0000.00716.22
7.3.300.0000.00716.32
7.3.290.0060.00816.30
7.3.280.0100.00916.33
7.3.270.0040.01217.40
7.3.260.0140.00416.35
7.3.250.0080.01016.38
7.3.240.0100.00916.31
7.3.230.0060.01216.50
7.3.210.0090.00916.57
7.3.200.0080.00816.53
7.3.190.0110.00616.62
7.3.180.0040.01416.39
7.3.170.0030.01316.57
7.3.160.0110.00716.34
7.3.120.0070.01114.95
7.3.110.0080.00814.91
7.3.100.0100.00614.79
7.3.90.0070.00714.70
7.3.80.0000.01614.79
7.3.70.0060.00314.74
7.3.60.0000.01314.52
7.3.50.0030.01314.46
7.3.40.0060.00614.63
7.3.30.0070.01414.75
7.3.20.0130.00716.69
7.3.10.0130.00316.43
7.3.00.0050.00816.58
7.2.330.0140.01116.50
7.2.320.0060.01616.33
7.2.310.0110.00616.50
7.2.300.0070.01016.32
7.2.290.0120.00916.57
7.2.250.0110.00714.73
7.2.240.0000.01815.17
7.2.230.0030.01315.18
7.2.220.0030.01014.53
7.2.210.0060.01214.79
7.2.200.0040.00815.06
7.2.190.0160.00014.76
7.2.180.0060.00314.71
7.2.170.0120.00014.62
7.2.60.0090.00316.74
7.2.00.0100.00719.44
7.1.330.0130.00315.36
7.1.320.0000.01815.86
7.1.310.0110.00315.73
7.1.300.0070.00715.43
7.1.290.0090.00015.64
7.1.280.0100.00315.38
7.1.270.0040.01215.62
7.1.260.0080.00815.84
7.1.200.0030.00315.38
7.1.100.1410.01015.81
7.1.70.0080.00016.97
7.1.60.0090.01519.13
7.1.50.0070.00716.86
7.1.00.0000.08022.44
7.0.200.0080.00316.67
7.0.60.0070.05020.00
7.0.50.0030.08017.89
7.0.40.0100.05720.26
7.0.30.0330.03720.09
7.0.20.0300.07720.25
7.0.10.0130.07320.07
7.0.00.0070.06720.10
5.6.280.0000.03321.08
5.6.210.0230.06320.48
5.6.200.0030.08018.13
5.6.190.0170.08020.60
5.6.180.0070.04320.64
5.6.170.0230.04320.47
5.6.160.0030.05020.54
5.6.150.0030.09018.14
5.6.140.0130.06718.24
5.6.130.0000.04718.18
5.6.120.0030.08021.14
5.6.110.0130.06721.01
5.6.100.0030.06021.03
5.6.90.0100.07721.17
5.6.80.0000.07320.39
5.5.350.4000.04020.48
5.5.340.0070.08017.98
5.5.330.0100.08020.25
5.5.320.0400.07320.35
5.5.310.0200.03720.39
5.5.300.0130.07318.08
5.5.290.0100.06318.07
5.5.280.0070.08320.66
5.5.270.0100.03720.80
5.5.260.0130.07720.88
5.5.250.0030.04020.72
5.5.240.0070.07720.08

preferences:
48.74 ms | 400 KiB | 5 Q