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.4.10.0050.00517.90
8.3.140.0100.00716.98
8.3.130.0040.00418.50
8.3.120.0080.00018.93
8.3.110.0040.00420.94
8.3.100.0100.00718.43
8.3.90.0040.00426.77
8.3.80.0070.00416.75
8.3.70.0060.00916.75
8.3.60.0120.00618.68
8.3.50.0100.00822.09
8.3.40.0110.00318.97
8.3.30.0140.00319.09
8.3.20.0000.00820.16
8.3.10.0000.00721.86
8.3.00.0030.00517.50
8.2.250.0090.00017.00
8.2.240.0040.00417.49
8.2.230.0000.00822.58
8.2.220.0060.00324.06
8.2.210.0030.00526.77
8.2.200.0060.00317.00
8.2.190.0160.00618.41
8.2.180.0080.00825.92
8.2.170.0100.01019.04
8.2.160.0070.00722.96
8.2.150.0040.00425.66
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0000.00720.07
8.2.110.0080.00321.00
8.2.100.0040.00817.84
8.2.90.0000.00919.40
8.2.80.0000.01117.97
8.2.70.0040.00417.78
8.2.60.0030.00517.93
8.2.50.0030.00618.07
8.2.40.0050.00319.25
8.2.30.0040.00418.00
8.2.20.0000.00817.57
8.2.10.0040.00417.95
8.2.00.0030.00518.08
8.1.300.0060.00319.75
8.1.290.0060.00330.84
8.1.280.0120.00325.92
8.1.270.0030.00622.12
8.1.260.0140.00428.09
8.1.250.0080.00028.09
8.1.240.0100.00722.61
8.1.230.0040.00820.88
8.1.220.0040.00417.76
8.1.210.0000.00818.97
8.1.200.0060.00317.35
8.1.190.0090.00017.35
8.1.180.0050.00318.10
8.1.170.0000.00818.57
8.1.160.0000.00822.13
8.1.150.0070.00018.90
8.1.140.0000.00717.31
8.1.130.0000.00720.19
8.1.120.0000.00717.34
8.1.110.0000.00817.45
8.1.100.0040.00417.46
8.1.90.0050.00317.38
8.1.80.0000.00717.38
8.1.70.0070.00017.43
8.1.60.0080.00017.61
8.1.50.0030.00717.58
8.1.40.0040.00717.45
8.1.30.0000.00817.57
8.1.20.0040.00417.65
8.1.10.0050.00317.63
8.1.00.0050.00217.45
8.0.300.0040.00420.03
8.0.290.0040.00416.75
8.0.280.0070.00018.46
8.0.270.0030.00317.18
8.0.260.0000.00618.47
8.0.250.0030.00316.96
8.0.240.0080.00016.93
8.0.230.0000.00716.96
8.0.220.0070.00016.89
8.0.210.0000.00716.89
8.0.200.0050.00316.93
8.0.190.0080.00017.00
8.0.180.0040.00416.89
8.0.170.0080.00016.89
8.0.160.0060.00316.76
8.0.150.0070.00016.84
8.0.140.0070.00016.93
8.0.130.0030.00313.31
8.0.120.0030.00516.87
8.0.110.0040.00416.82
8.0.100.0000.00716.86
8.0.90.0000.00816.88
8.0.80.0120.00416.88
8.0.70.0040.00416.95
8.0.60.0000.00716.93
8.0.50.0070.00016.97
8.0.30.0110.01317.23
8.0.20.0140.00517.40
8.0.10.0040.00417.01
8.0.00.0090.00916.91
7.4.330.0030.00315.05
7.4.320.0060.00016.60
7.4.300.0000.00716.48
7.4.290.0030.00316.41
7.4.280.0080.00016.57
7.4.270.0000.00716.43
7.4.260.0000.01016.58
7.4.250.0000.00816.39
7.4.240.0040.00316.49
7.4.230.0030.00316.68
7.4.220.0140.01016.58
7.4.210.0060.00916.56
7.4.200.0050.00216.63
7.4.160.0080.00816.38
7.4.150.0100.00717.40
7.4.140.0140.00517.86
7.4.130.0070.01116.54
7.4.120.0070.01016.52
7.4.110.0090.00916.73
7.4.100.0100.01016.47
7.4.90.0120.01516.52
7.4.80.0000.01819.39
7.4.70.0160.00816.58
7.4.60.0080.00816.41
7.4.50.0070.00516.34
7.4.40.0090.00616.34
7.4.30.0140.00316.55
7.4.20.0150.00416.32
7.4.10.0040.01416.50
7.4.00.0090.00615.72
7.3.330.0000.00613.29
7.3.320.0150.00313.25
7.3.310.0000.00716.16
7.3.300.0000.00716.31
7.3.290.0040.00416.36
7.3.280.0090.00816.31
7.3.270.0070.01017.40
7.3.260.0160.00616.39
7.3.250.0080.00916.34
7.3.240.0120.00616.36
7.3.230.0070.01316.39
7.3.210.0090.00816.24
7.3.200.0030.01419.39
7.3.190.0030.01316.47
7.3.180.0060.01216.42
7.3.170.0090.00616.23
7.3.160.0140.00216.27
7.3.150.0110.00516.03
7.3.140.0060.01016.41
7.3.130.0110.00616.33
7.3.120.0050.01115.48
7.3.110.0070.00915.68
7.3.100.0060.00715.63
7.3.90.0090.00615.44
7.3.80.0060.00815.66
7.3.70.0030.01515.48
7.3.60.0120.00815.48
7.3.50.0050.01315.52
7.3.40.0040.00915.59
7.3.30.0100.00515.56
7.3.20.0070.00716.59
7.3.10.0120.00416.30
7.3.00.0070.00816.34
7.2.330.0100.00716.27
7.2.320.0090.00916.68
7.2.310.0090.00916.05
7.2.300.0080.00816.55
7.2.290.0080.00816.29
7.2.280.0170.00016.61
7.2.270.0120.00816.25
7.2.260.0000.01616.39
7.2.250.0170.00016.63
7.2.240.0040.01415.66
7.2.230.0070.00915.91
7.2.220.0060.01115.77
7.2.210.0030.01115.88
7.2.200.0110.00615.50
7.2.190.0130.00415.52
7.2.180.0050.01515.49
7.2.170.0110.00515.64
7.2.160.0110.00615.68
7.2.150.0100.01016.55
7.2.140.0060.00816.44
7.2.130.0060.01016.54
7.2.120.0100.00816.58
7.2.110.0050.01016.72
7.2.100.0070.01016.58
7.2.90.0080.01116.62
7.2.80.0070.01016.49
7.2.70.0110.00416.54
7.2.60.0020.01216.69
7.2.50.0050.01116.54
7.2.40.0160.00516.58
7.2.30.0110.00516.59
7.2.20.0080.00816.54
7.2.10.0080.00816.56
7.2.00.0050.01116.53
7.1.330.0110.01215.49
7.1.320.0120.01315.52
7.1.310.0150.00615.58
7.1.300.0200.00515.32
7.1.290.0090.01215.50
7.1.280.0170.00915.65
7.1.270.0160.01015.57
7.1.260.0190.00515.48
7.1.250.0260.00615.47
7.1.240.0200.00715.52
7.1.230.0220.00715.40
7.1.220.0270.00715.24
7.1.210.0290.00415.43
7.1.200.0130.01015.62
7.1.190.0210.00715.46
7.1.180.0170.01015.25
7.1.170.0250.00315.33
7.1.160.0470.00715.34
7.1.150.0200.00815.50
7.1.140.0260.00315.62
7.1.130.0160.01215.31
7.1.120.0230.00915.31
7.1.110.0250.00715.48
7.1.100.0220.00615.60
7.1.90.0210.00815.52
7.1.80.0210.00615.57
7.1.70.0110.00816.22
7.1.60.0110.01016.21
7.1.50.0160.00816.13
7.1.40.0140.00515.96
7.1.30.0160.00515.99
7.1.20.0130.00716.17
7.1.10.0150.00815.95
7.1.00.0090.00715.96
7.0.330.0260.00015.29
7.0.320.0220.00715.12
7.0.310.0200.00715.34
7.0.300.0220.00815.11
7.0.290.0190.00815.21
7.0.280.0170.01715.23
7.0.270.0250.00015.27
7.0.260.0270.00515.26
7.0.250.0270.00015.30
7.0.240.0250.00615.21
7.0.230.0180.00915.39
7.0.220.0260.01115.31
7.0.210.0170.01015.14
7.0.200.0110.00715.85
7.0.190.0110.00615.86
7.0.180.0150.00215.59
7.0.170.0180.00315.57
7.0.160.0090.00815.79
7.0.150.0130.00815.75
7.0.140.0140.00415.65
7.0.130.0080.00915.77
7.0.120.0100.01015.83
7.0.110.0100.00815.84
7.0.100.0120.00915.74
7.0.90.0120.00715.89
7.0.80.0180.00715.74
7.0.70.0040.01015.82
7.0.60.0130.00115.73
7.0.50.0110.00615.93
7.0.40.0110.00715.13
7.0.30.0120.00415.17
7.0.20.0170.00415.21
7.0.10.0090.00815.17
7.0.00.0100.00715.14
5.6.400.0190.01115.95
5.6.390.0180.00915.62
5.6.380.0170.01415.49
5.6.370.0160.01315.72
5.6.360.0200.00915.78
5.6.350.0170.01015.77
5.6.340.0120.01515.81
5.6.330.0160.01215.55
5.6.320.0170.01115.80
5.6.310.0240.00415.50
5.6.300.0120.03218.34
5.6.290.0130.02518.16
5.6.280.0150.03118.37
5.6.270.0160.02018.44
5.6.260.0140.04118.18
5.6.250.0100.03018.32
5.6.240.0120.03018.31
5.6.230.0100.03118.24
5.6.220.0070.03318.31
5.6.210.0070.03018.23
5.6.200.0150.02118.17
5.6.190.0060.03318.25
5.6.180.0130.02318.35
5.6.170.0060.03118.15
5.6.160.0100.02618.22
5.6.150.0080.03418.42
5.6.140.0140.02918.04
5.6.130.0110.02818.37
5.6.120.0120.02718.25
5.6.110.0150.02318.38
5.6.100.0120.02518.32
5.6.90.0100.02818.18
5.6.80.0090.02517.84
5.6.70.0130.02217.93
5.6.60.0150.02817.89
5.6.50.0070.03018.03
5.6.40.0120.02218.04
5.6.30.0140.02317.97
5.6.20.0090.03118.03
5.6.10.0070.03417.97
5.6.00.0090.02917.91
5.5.380.0100.02516.45
5.5.370.0070.03016.45
5.5.360.0150.01816.74
5.5.350.0110.02616.65
5.5.340.0140.02616.66
5.5.330.0050.02916.77
5.5.320.0040.03216.80
5.5.310.0110.02616.71
5.5.300.0120.02516.87
5.5.290.0150.03116.94
5.5.280.0110.04016.73
5.5.270.0110.02816.84
5.5.260.0160.02416.88
5.5.250.0100.02616.73
5.5.240.0100.02316.48
5.5.230.0090.02616.49
5.5.220.0100.02616.43
5.5.210.0120.02516.51
5.5.200.0110.02616.36
5.5.190.0090.03116.49
5.5.180.0110.02916.37
5.5.170.0190.00915.51
5.5.160.0140.02216.59
5.5.150.0100.02516.56
5.5.140.0100.02616.38
5.5.130.0130.02416.41
5.5.120.0070.02716.51
5.5.110.0120.02216.51
5.5.100.0150.02516.41
5.5.90.0070.02816.38
5.5.80.0170.02016.34
5.5.70.0100.02916.36
5.5.60.0150.02016.33
5.5.50.0120.02516.46
5.5.40.0130.02516.38
5.5.30.0110.02416.38
5.5.20.0120.02516.50
5.5.10.0120.02416.47
5.5.00.0120.02716.34
5.4.450.0140.01815.84
5.4.440.0090.02615.84
5.4.430.0080.02215.87
5.4.420.0050.02615.95
5.4.410.0100.02115.91
5.4.400.0120.03815.63
5.4.390.0070.03015.54
5.4.380.0100.02915.70
5.4.370.0070.02215.56
5.4.360.0060.02815.62
5.4.350.0140.01615.62
5.4.340.0070.02715.62
5.4.330.0090.00912.30
5.4.320.0060.02415.72
5.4.310.0080.02415.73
5.4.300.0110.02115.71
5.4.290.0100.02315.69
5.4.280.0070.02515.71
5.4.270.0090.02315.74
5.4.260.0090.02315.73
5.4.250.0060.02515.69
5.4.240.0080.02415.79
5.4.230.0070.02615.82
5.4.220.0110.02415.70
5.4.210.0120.04315.71
5.4.200.0070.02615.66
5.4.190.0100.02515.70
5.4.180.0130.02415.57
5.4.170.0100.02415.75
5.4.160.0070.03015.64
5.4.150.0100.02815.63
5.4.140.0060.02814.57
5.4.130.0090.02314.54
5.4.120.0110.02014.49
5.4.110.0130.03114.37
5.4.100.0140.02414.59
5.4.90.0140.02514.69
5.4.80.0070.02414.38
5.4.70.0120.02214.49
5.4.60.0080.03014.49
5.4.50.0100.02414.34
5.4.40.0140.02314.54
5.4.30.0120.02014.48
5.4.20.0110.02314.47
5.4.10.0090.02314.50
5.4.00.0070.02414.08

preferences:
43.95 ms | 403 KiB | 5 Q