3v4l.org

run code in 300+ PHP versions simultaneously
<?php function allowedArgs($input, $allowed) { return array_filter( $input, function ($key) use ($allowed) { return in_array($key, $allowed); }, ARRAY_FILTER_USE_KEY ); } function example($args) { extract(allowedArgs($args, ['foo', 'bar'])); var_dump($foo, $bar, $baz); } example(['bar' => 2, 'foo' => 1, 'baz'=> 3]);

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.0070.00716.38
8.3.50.0110.00921.93
8.3.40.0140.00418.73
8.3.30.0150.00618.71
8.3.20.0070.00020.39
8.3.10.0050.00320.21
8.3.00.0000.00823.50
8.2.180.0120.00918.12
8.2.170.0060.00922.96
8.2.160.0030.01020.57
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0040.00422.05
8.2.120.0050.00326.35
8.2.110.0030.00619.33
8.2.100.0110.00018.09
8.2.90.0000.01019.02
8.2.80.0080.00017.97
8.2.70.0000.00817.75
8.2.60.0000.01017.93
8.2.50.0040.00418.10
8.2.40.0040.00420.46
8.2.30.0000.00819.16
8.2.20.0000.00818.04
8.2.10.0040.00417.98
8.2.00.0040.00418.24
8.1.280.0000.01425.92
8.1.270.0070.00022.24
8.1.260.0030.00526.35
8.1.250.0040.00428.09
8.1.240.0040.00423.98
8.1.230.0040.00917.45
8.1.220.0030.00617.78
8.1.210.0060.00318.77
8.1.200.0000.00917.25
8.1.190.0060.00317.23
8.1.180.0080.00018.10
8.1.170.0030.00618.45
8.1.160.0040.00418.81
8.1.150.0040.00320.17
8.1.140.0030.00519.47
8.1.130.0030.00320.61
8.1.120.0030.00617.41
8.1.110.0060.00317.45
8.1.100.0040.00417.45
8.1.90.0000.00717.37
8.1.80.0040.00417.43
8.1.70.0040.00417.42
8.1.60.0040.00417.48
8.1.50.0070.00017.37
8.1.40.0080.00017.49
8.1.30.0050.00217.53
8.1.20.0040.00417.63
8.1.10.0000.00817.35
8.1.00.0000.00817.36
8.0.300.0080.00018.77
8.0.290.0030.00516.75
8.0.280.0040.00418.36
8.0.270.0000.00716.70
8.0.260.0050.00217.09
8.0.250.0000.00716.88
8.0.240.0000.00816.92
8.0.230.0040.00416.92
8.0.220.0030.00316.80
8.0.210.0000.00716.90
8.0.200.0030.00316.83
8.0.190.0050.00216.96
8.0.180.0070.00016.92
8.0.170.0040.00416.90
8.0.160.0020.00516.90
8.0.150.0080.00416.79
8.0.140.0000.00716.74
8.0.130.0030.00313.22
8.0.120.0040.00416.84
8.0.110.0040.00416.77
8.0.100.0050.00316.81
8.0.90.0030.00316.84
8.0.80.0030.01216.83
8.0.70.0040.00416.92
8.0.60.0000.00816.70
8.0.50.0040.00416.98
8.0.30.0110.00916.91
8.0.20.0100.01117.40
8.0.10.0050.00217.04
8.0.00.0120.00616.62
7.4.330.0050.00015.55
7.4.320.0000.00616.34
7.4.300.0060.00016.43
7.4.290.0000.00716.43
7.4.280.0000.00916.34
7.4.270.0050.00316.34
7.4.260.0050.00316.51
7.4.250.0040.00416.51
7.4.240.0070.00016.43
7.4.230.0040.00416.41
7.4.220.0030.01416.39
7.4.210.0110.00316.39
7.4.200.0000.00716.57
7.4.160.0110.00816.48
7.4.150.0100.01017.40
7.4.140.0100.00817.86
7.4.130.0110.00716.45
7.4.120.0120.00916.47
7.4.110.0120.00716.44
7.4.100.0170.00416.50
7.4.90.0100.00716.34
7.4.80.0070.01119.39
7.4.70.0100.00616.36
7.4.60.0090.00916.29
7.4.50.0060.00616.56
7.4.40.0080.00916.61
7.4.30.0120.00916.68
7.4.00.0070.01114.99
7.3.330.0000.00513.33
7.3.320.0040.00413.33
7.3.310.0070.00016.15
7.3.300.0030.00316.36
7.3.290.0070.00916.36
7.3.280.0110.00716.39
7.3.270.0080.01517.40
7.3.260.0100.00816.39
7.3.250.0130.00616.35
7.3.240.0060.01016.52
7.3.230.0030.01316.55
7.3.210.0070.01016.46
7.3.200.0090.00916.37
7.3.190.0030.01316.55
7.3.180.0060.00916.54
7.3.170.0040.01116.52
7.3.160.0070.01416.50
7.3.120.0080.00614.63
7.3.110.0070.00714.50
7.3.100.0040.01114.88
7.3.90.0060.00314.69
7.3.80.0120.00014.93
7.3.70.0040.00714.82
7.3.60.0000.01314.78
7.3.50.0120.00014.61
7.3.40.0060.00314.93
7.3.30.0060.00614.82
7.3.20.0060.00316.88
7.3.10.0040.00716.88
7.3.00.0070.00716.82
7.2.330.0100.00716.60
7.2.320.0100.00716.61
7.2.310.0170.00016.67
7.2.300.0060.01216.31
7.2.290.0110.00716.30
7.2.250.0130.00715.13
7.2.240.0100.01014.69
7.2.230.0040.01114.91
7.2.220.0070.00714.91
7.2.210.0130.00315.16
7.2.200.0110.00614.96
7.2.190.0090.00614.87
7.2.180.0000.01215.07
7.2.170.0030.00914.93
7.2.60.0040.00716.77
7.2.50.0100.00316.86
7.1.330.0040.01115.54
7.1.320.0070.00715.54
7.1.310.0060.00915.92
7.1.300.0030.00615.86
7.1.290.0040.01215.79
7.1.280.0070.00715.87
7.1.270.0090.00315.75
7.1.260.0030.01415.64
7.1.200.0110.00315.46
7.1.70.0000.01017.19
7.1.60.0040.00817.04
7.1.30.2730.08336.48
7.1.20.2670.06736.44
7.1.10.2570.05720.27
7.1.00.3530.06720.58
7.0.200.0030.00916.54
7.0.170.3030.06720.04
7.0.160.2600.07719.91
7.0.150.2470.05320.09
7.0.140.3070.05320.09
7.0.130.3530.07719.94
7.0.120.3730.06020.06
7.0.110.3670.09020.10
7.0.100.2630.06020.16
7.0.90.3570.05320.11
7.0.80.2970.06320.02
7.0.70.2330.06720.09
7.0.60.3200.07320.17
7.0.50.2200.09020.20
7.0.40.2500.05720.12
7.0.30.2130.04720.10
7.0.20.2400.06020.05
7.0.10.2100.05020.11
7.0.00.2170.05720.04

preferences:
50.18 ms | 401 KiB | 5 Q