3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types=1); namespace funcs { function int(int ...$ints) {} } namespace { function sum(array $ints): int { (funcs\int)(...$ints); return array_sum($ints); } var_dump(sum([1, 2, 3])); var_dump(sum([1, 2, "three"])); }

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.0060.00918.66
8.3.30.0120.00318.72
8.3.20.0080.00018.99
8.3.10.0090.00019.21
8.3.00.0040.00423.48
8.2.170.0060.00922.96
8.2.160.0100.00322.08
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0030.00519.70
8.2.120.0070.00026.35
8.2.110.0090.00022.25
8.2.100.0040.00817.72
8.2.90.0060.00319.08
8.2.80.0000.01017.97
8.2.70.0060.00318.04
8.2.60.0040.00417.93
8.2.50.0060.00318.10
8.2.40.0040.00419.14
8.2.30.0000.00719.35
8.2.20.0000.00918.05
8.2.10.0030.00717.96
8.2.00.0030.00319.49
8.1.270.0030.00622.10
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0060.00323.97
8.1.230.0060.00617.57
8.1.220.0000.00917.74
8.1.210.0060.00318.77
8.1.200.0030.00617.22
8.1.190.0060.00317.23
8.1.180.0000.00718.10
8.1.170.0000.00818.47
8.1.160.0070.00018.86
8.1.150.0000.00718.75
8.1.140.0040.00417.55
8.1.130.0000.00719.01
8.1.120.0070.00017.44
8.1.110.0000.00817.38
8.1.100.0050.00217.40
8.1.90.0040.00417.28
8.1.80.0000.00717.40
8.1.70.0030.00617.38
8.1.60.0090.00317.59
8.1.50.0080.00017.47
8.1.40.0060.00317.33
8.1.30.0040.00417.57
8.1.20.0070.00017.45
8.1.10.0030.00617.52
8.1.00.0060.00317.47
8.0.300.0030.00718.77
8.0.290.0000.00916.75
8.0.280.0070.00018.41
8.0.270.0070.00017.25
8.0.260.0070.00017.19
8.0.250.0000.00716.98
8.0.240.0030.00317.00
8.0.230.0030.00316.95
8.0.220.0030.00616.96
8.0.210.0070.00016.82
8.0.200.0030.00316.93
8.0.190.0000.00716.90
8.0.180.0050.00216.88
8.0.170.0040.00416.95
8.0.160.0070.00016.92
8.0.150.0000.00716.84
8.0.140.0000.00916.89
8.0.130.0030.00313.41
8.0.120.0040.00416.91
8.0.110.0040.00416.99
8.0.100.0070.00017.01
8.0.90.0070.00016.94
8.0.80.0100.00716.92
8.0.70.0040.00416.79
8.0.60.0040.00416.83
8.0.50.0040.00417.00
8.0.30.0140.00417.16
8.0.20.0060.01417.40
8.0.10.0040.00417.00
8.0.00.0080.01116.71
7.4.330.0000.00615.55
7.4.320.0060.00016.53
7.4.300.0030.00316.34
7.4.290.0000.00716.34
7.4.280.0040.00416.37
7.4.270.0000.00716.29
7.4.260.0000.00716.56
7.4.250.0000.00716.45
7.4.240.0070.00016.54
7.4.230.0030.00316.63
7.4.220.0040.00316.27
7.4.210.0090.00716.50
7.4.200.0000.00716.32
7.4.160.0080.00816.46
7.4.140.0100.00817.86
7.4.130.0160.00616.50
7.4.120.0120.01016.46
7.4.110.0030.01316.33
7.4.100.0100.00716.41
7.4.90.0130.00316.39
7.4.80.0150.00319.39
7.4.70.0060.01216.66
7.4.60.0090.00816.50
7.4.50.0100.00616.47
7.4.40.0070.01416.29
7.4.00.0060.01014.96
7.3.330.0020.00213.16
7.3.320.0030.00313.15
7.3.310.0040.00416.30
7.3.300.0000.00616.31
7.3.290.0030.00316.18
7.3.280.0070.00916.30
7.3.260.0130.00816.45
7.3.240.0130.00516.43
7.3.230.0130.00316.32
7.3.210.0110.00716.34
7.3.200.0090.00616.38
7.3.190.0100.00616.57
7.3.180.0100.00716.27
7.3.170.0090.00616.38
7.3.160.0080.00816.25
7.3.120.0120.00614.92
7.3.110.0050.01014.84
7.3.100.0050.01014.86
7.3.90.0030.01114.64
7.3.80.0060.00714.77
7.3.70.0030.01214.83
7.3.60.0050.01314.79
7.3.50.0060.01114.76
7.3.40.0040.01114.98
7.3.30.0080.00714.66
7.3.20.0030.01316.56
7.3.10.0070.00616.57
7.3.00.0060.00716.59
7.2.330.0110.00616.73
7.2.320.0100.01016.71
7.2.310.0070.01716.28
7.2.300.0100.00716.69
7.2.290.0100.00716.66
7.2.250.0060.01114.98
7.2.240.0080.01015.13
7.2.230.0050.01014.97
7.2.220.0070.00615.05
7.2.210.0090.00415.01
7.2.200.0000.01114.71
7.2.190.0050.01314.96
7.2.180.0080.00614.88
7.2.170.0050.00514.92
7.2.60.0220.00615.00
7.2.50.0290.01314.75
7.2.40.0260.00315.14
7.2.30.0210.00714.82
7.2.20.0200.00814.79
7.2.10.0190.00914.80
7.2.00.0290.00414.85
7.1.330.0030.01215.71
7.1.320.0030.00815.55
7.1.310.0050.01015.69
7.1.300.0060.00815.69
7.1.290.0030.01115.64
7.1.280.0090.00515.88
7.1.270.0090.00615.61
7.1.260.0020.00915.67
7.1.200.0000.00915.65
7.1.170.0260.00413.67
7.1.160.0170.00813.83
7.1.150.0200.00613.63
7.1.140.0250.01113.66
7.1.130.0290.00813.81
7.1.120.0150.01113.69
7.1.110.0200.00714.00
7.1.100.0390.00813.50
7.1.90.0140.01413.91
7.1.80.0130.01313.95
7.1.70.0330.00013.93
7.1.60.0400.00731.73
7.1.50.0440.01731.74
7.1.40.1040.01331.88
7.1.30.0470.00731.73
7.1.20.0340.01331.77
7.1.10.0340.00313.79
7.1.00.0340.00613.82

preferences:
43.92 ms | 400 KiB | 5 Q