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; })(...$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.60.0160.00618.68
8.3.50.0110.00416.48
8.3.40.0110.00418.79
8.3.30.0140.00718.80
8.3.20.0000.00720.29
8.3.10.0000.00821.96
8.3.00.0080.00017.93
8.2.180.0110.00718.39
8.2.170.0100.00722.96
8.2.160.0130.00020.30
8.2.150.0030.00524.18
8.2.140.0030.00624.66
8.2.130.0000.00926.16
8.2.120.0000.00817.60
8.2.110.0100.00020.57
8.2.100.0040.00817.97
8.2.90.0040.00419.23
8.2.80.0030.00517.97
8.2.70.0000.01117.63
8.2.60.0000.00917.90
8.2.50.0000.00818.07
8.2.40.0040.00419.31
8.2.30.0000.01117.95
8.2.20.0040.00417.61
8.2.10.0000.00717.98
8.2.00.0040.00417.97
8.1.270.0200.00021.91
8.1.260.0000.00726.35
8.1.250.0040.00428.09
8.1.240.0090.00020.88
8.1.230.0070.00317.45
8.1.220.0030.00617.79
8.1.210.0040.00418.77
8.1.200.0030.00617.35
8.1.190.0040.00419.01
8.1.180.0030.00618.10
8.1.170.0040.00418.64
8.1.160.0040.00421.91
8.1.150.0050.00218.89
8.1.140.0030.00517.40
8.1.130.0030.00317.71
8.1.120.0070.00017.28
8.1.110.0040.00417.38
8.1.100.0070.00017.43
8.1.90.0040.00417.47
8.1.80.0040.00417.34
8.1.70.0000.00817.35
8.1.60.0040.00417.52
8.1.50.0030.00617.54
8.1.40.0040.00417.54
8.1.30.0070.00317.55
8.1.20.0040.00417.56
8.1.10.0040.00417.55
8.1.00.0040.00417.58
8.0.300.0000.00718.77
8.0.290.0000.00716.88
8.0.280.0030.00418.50
8.0.270.0030.00317.27
8.0.260.0030.00317.28
8.0.250.0000.00717.03
8.0.240.0000.00716.98
8.0.230.0040.00416.89
8.0.220.0030.00516.97
8.0.210.0000.00816.80
8.0.200.0040.00417.02
8.0.190.0050.00317.00
8.0.180.0000.00816.93
8.0.170.0040.00416.96
8.0.160.0040.00416.86
8.0.150.0000.00716.90
8.0.140.0000.00716.82
8.0.130.0030.00313.41
8.0.120.0070.00016.91
8.0.110.0080.00016.80
8.0.100.0000.00716.84
8.0.90.0000.00817.03
8.0.80.0100.01016.96
8.0.70.0000.00716.92
8.0.60.0040.00416.84
8.0.50.0050.00216.79
8.0.30.0100.01017.14
8.0.20.0100.00917.40
8.0.10.0040.00417.11
8.0.00.0090.00916.74
7.4.330.0000.00515.10
7.4.320.0000.00616.58
7.4.300.0030.00316.59
7.4.290.0050.00316.64
7.4.280.0000.00816.57
7.4.270.0030.00316.52
7.4.260.0040.00416.50
7.4.250.0050.00216.37
7.4.240.0050.00216.56
7.4.230.0060.00016.30
7.4.220.0030.01416.62
7.4.210.0050.00916.47
7.4.200.0040.00416.59
7.4.160.0090.00916.64
7.4.150.0090.00917.40
7.4.140.0100.01017.86
7.4.130.0130.00616.56
7.4.120.0130.00516.56
7.4.110.0070.01016.59
7.4.100.0110.00716.63
7.4.90.0090.00816.36
7.4.80.0120.01019.39
7.4.70.0080.00816.63
7.4.60.0150.00916.56
7.4.50.0050.00316.35
7.4.40.0120.00416.63
7.4.30.0120.00816.66
7.4.00.0070.00714.80
7.3.330.0050.00013.13
7.3.320.0000.00513.10
7.3.310.0030.00616.15
7.3.300.0000.00616.16
7.3.290.0040.00416.27
7.3.280.0120.00816.30
7.3.270.0070.01017.40
7.3.260.0110.00616.33
7.3.250.0060.01316.36
7.3.240.0110.00816.38
7.3.230.0110.00616.39
7.3.210.0120.00616.62
7.3.200.0120.00416.55
7.3.190.0090.00916.21
7.3.180.0150.00016.44
7.3.170.0090.00616.46
7.3.160.0070.01416.24
7.2.330.0170.00716.59
7.2.320.0100.00916.55
7.2.310.0070.01516.59
7.2.300.0160.00016.51
7.2.290.0120.00616.39
7.2.60.0090.00616.91
7.2.00.0030.01319.23
7.1.200.0160.00315.74
7.1.100.0070.00718.00
7.1.70.0000.01217.07
7.1.60.0060.01519.27
7.1.50.0110.01117.00
7.1.00.0070.07322.36
7.0.200.0030.00716.82
7.0.60.0070.07719.93
7.0.50.0000.04317.87
7.0.40.0100.05319.96
7.0.30.0500.03720.16
7.0.20.0170.05320.24
7.0.10.0030.04320.19
7.0.00.0070.08320.22
5.6.280.0030.05721.00
5.6.210.0070.08320.63
5.6.200.0200.07018.18
5.6.190.0070.08720.67
5.6.180.3370.04320.79
5.6.170.0300.07320.56
5.6.160.0100.08020.47
5.6.150.0070.03718.19
5.6.140.0000.09318.15
5.6.130.0000.04318.24
5.6.120.0100.03720.90
5.6.110.0030.07021.20
5.6.100.0100.08021.00
5.6.90.0030.04020.99
5.6.80.0070.04020.38
5.6.70.4430.03720.44
5.5.350.0330.07020.45
5.5.340.0030.07317.99
5.5.330.0030.06020.20
5.5.320.3530.04020.33
5.5.310.0230.07720.31
5.5.300.0000.04317.96
5.5.290.0030.04318.01
5.5.280.0070.06320.78
5.5.270.0070.05320.80
5.5.260.0070.08720.88
5.5.250.0100.08020.71
5.5.240.0130.03320.06
5.4.450.2670.04019.52
5.4.440.3270.04019.54
5.4.430.0030.04719.54
5.4.420.3200.03319.19
5.4.410.2730.05019.14
5.4.400.3130.04019.34
5.4.390.2900.03719.15
5.4.380.2830.03719.15
5.4.370.0070.07319.15
5.4.360.0070.08018.98
5.4.350.3630.03718.85
5.4.340.4170.02319.22
5.4.320.2000.03318.95
5.4.310.2730.04318.95
5.4.300.2870.04019.02
5.4.290.2900.04319.09
5.4.280.3070.03718.99
5.4.270.2930.03719.07
5.4.260.2470.03719.10
5.4.250.2730.03719.05
5.4.240.2630.02719.00
5.4.230.3400.03019.21
5.4.220.3070.03319.21
5.4.210.3170.03718.98
5.4.200.3370.04019.14
5.4.190.3770.03718.93
5.4.180.4070.03719.18
5.4.170.2700.03719.14
5.4.160.2870.04318.83
5.4.150.2900.03319.17
5.4.140.3700.04316.57
5.4.130.3230.03016.33
5.4.120.3600.03716.48
5.4.110.3430.03716.48
5.4.100.3170.04016.31
5.4.90.3070.04016.48
5.4.80.3170.04016.40

preferences:
55.36 ms | 400 KiB | 5 Q