3v4l.org

run code in 500+ PHP versions simultaneously
<?php interface SplStackFacadeInterface { public static function fromArray(array $arr); } class SplStackFacade extends SplStack implements SplStackFacadeInterface { public static function fromArray(array $arr): SplStack { $splStack = new self(); array_map([$splStack, 'push'], $arr); return $splStack; } } var_dump(SplStackFacade::fromArray([1, 2, 3, 4]));

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.5.70.0120.00516.84
8.5.60.0120.00716.91
8.5.50.0080.01016.57
8.5.30.0120.00519.63
8.5.20.0070.01019.30
8.5.10.0110.00720.22
8.5.00.0110.01019.77
8.4.220.0050.00519.63
8.4.210.0110.00919.52
8.4.180.0140.00819.76
8.4.170.0130.00819.80
8.4.160.0150.01022.03
8.4.150.0090.00316.80
8.4.140.0130.00717.25
8.4.130.0110.00917.64
8.4.120.0130.00724.00
8.4.110.0090.01018.97
8.4.100.0150.00617.73
8.4.90.0120.00820.48
8.4.80.0040.00318.93
8.4.70.0050.00422.48
8.4.60.0140.00620.62
8.4.50.0070.01317.68
8.4.40.0170.00719.71
8.4.30.0130.00720.25
8.4.20.0080.01119.91
8.4.10.0100.01024.08
8.3.310.0120.00820.23
8.3.300.0080.01120.75
8.3.290.0120.00820.51
8.3.280.0150.01018.26
8.3.270.0160.00316.59
8.3.260.0060.00316.77
8.3.250.0110.00818.67
8.3.240.0060.00217.40
8.3.230.0120.00716.81
8.3.220.0060.00219.05
8.3.210.0090.00616.62
8.3.200.0060.00216.44
8.3.190.0140.00517.09
8.3.180.0080.00518.54
8.3.170.0140.00318.77
8.3.160.0140.00416.57
8.3.150.0040.00418.80
8.3.140.0080.00016.61
8.3.130.0050.00516.77
8.3.120.0030.00618.98
8.3.110.0090.00016.73
8.3.100.0100.01016.36
8.3.90.0070.00326.77
8.3.80.0060.00316.63
8.3.70.0070.01416.63
8.3.60.0060.01218.18
8.3.50.0000.01520.16
8.3.40.0170.00020.04
8.3.30.0110.00418.67
8.3.20.0070.00024.18
8.3.10.0070.01424.66
8.3.00.0050.00326.16
8.2.310.0110.00918.00
8.2.300.0110.00922.21
8.2.290.0120.00716.59
8.2.280.0110.00718.20
8.2.270.0180.00018.94
8.2.260.0040.00418.76
8.2.250.0040.00418.29
8.2.240.0030.01319.07
8.2.230.0040.00420.94
8.2.220.0070.00337.54
8.2.210.0040.00426.77
8.2.200.0030.00618.29
8.2.190.0090.00916.58
8.2.180.0120.00325.92
8.2.170.0150.00619.08
8.2.160.0140.00322.96
8.2.150.0000.00725.66
8.2.140.0040.00424.66
8.2.130.0000.00726.16
8.2.120.0040.00419.79
8.2.110.0000.00820.52
8.2.100.0060.00617.91
8.2.90.0030.00618.34
8.2.80.0000.00818.13
8.2.70.0040.00417.63
8.2.60.0000.00818.16
8.2.50.0000.00818.10
8.2.40.0040.00419.27
8.2.30.0040.00419.14
8.2.20.0040.00419.44
8.2.10.0040.00417.94
8.2.00.0030.00519.23
8.1.340.0090.01023.81
8.1.330.0120.00616.42
8.1.320.0100.00917.79
8.1.310.0070.01018.41
8.1.300.0040.00420.31
8.1.290.0040.00430.84
8.1.280.0150.00625.92
8.1.270.0040.00422.05
8.1.260.0050.00326.35
8.1.250.0000.00828.09
8.1.240.0080.00019.31
8.1.230.0080.00421.03
8.1.220.0040.00417.79
8.1.210.0060.00318.77
8.1.200.0050.00517.35
8.1.190.0090.00017.10
8.1.180.0040.00418.10
8.1.170.0050.00318.61
8.1.160.0000.00718.89
8.1.150.0040.00418.64
8.1.140.0000.00717.45
8.1.130.0070.00318.64
8.1.120.0050.00518.66
8.1.110.0070.00318.65
8.1.100.0060.00418.61
8.1.90.0030.00718.68
8.1.80.0060.00418.70
8.1.70.0040.00618.64
8.1.60.0040.00619.61
8.1.50.0060.00419.54
8.1.40.0050.00519.73
8.1.30.0040.00618.81
8.1.20.0080.00619.67
8.1.10.0060.00818.75
8.1.00.0090.00618.69
8.0.300.0040.00419.86
8.0.290.0060.00316.75
8.0.280.0000.00718.43
8.0.270.0090.00017.94
8.0.260.0060.00717.91
8.0.250.0130.00017.95
8.0.240.0070.00718.06
8.0.230.0110.00418.06
8.0.220.0080.00517.94
8.0.210.0110.00317.97
8.0.200.0080.00517.99
8.0.190.0110.00118.00
8.0.180.0080.00418.00
8.0.170.0100.00317.91
8.0.160.0080.00417.99
8.0.150.0060.00517.95
8.0.140.0110.00017.95
8.0.130.0070.00318.04
8.0.120.0030.00618.91
8.0.110.0060.00318.77
8.0.100.0050.00418.00
8.0.90.0030.00717.88
8.0.80.0080.00417.96
8.0.70.0090.00417.99
8.0.60.0080.00517.99
8.0.50.0080.00417.98
8.0.30.0090.00517.98
8.0.20.0060.00718.07
8.0.10.0050.00618.07

preferences:
25.19 ms | 1169 KiB | 5 Q