3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ 0 => 'apple', 'b' => 'banana', 3 => 'cow', 'wrench' => 'duck', ]; $filtered = array_filter( $array, function ($k) { return is_numeric($k); }, // test to include only numeric keyed ARRAY_FILTER_USE_KEY // new in PHP 5.6 ); var_dump($filtered);

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.20.0110.01117.70
8.4.10.0060.00319.63
8.3.150.0060.01319.03
8.3.140.0040.01420.91
8.3.130.0080.00018.56
8.3.120.0040.01120.71
8.3.110.0120.00320.94
8.3.100.0090.00024.06
8.3.90.0090.00626.77
8.3.80.0060.00316.75
8.3.70.0100.00716.58
8.3.60.0120.00618.43
8.3.50.0100.00922.91
8.3.40.0040.01218.59
8.3.30.0000.01418.58
8.3.20.0000.00820.34
8.3.10.0040.00421.73
8.3.00.0080.00019.62
8.2.260.0110.00719.00
8.2.250.0040.00416.38
8.2.240.0060.01316.84
8.2.230.0040.00422.58
8.2.220.0080.00037.54
8.2.210.0030.00526.77
8.2.200.0060.00316.25
8.2.190.0100.01016.58
8.2.180.0050.01025.92
8.2.170.0110.00418.94
8.2.160.0110.00419.21
8.2.150.0000.00725.66
8.2.140.0060.00324.66
8.2.130.0030.00526.16
8.2.120.0050.00226.16
8.2.110.0040.00721.00
8.2.100.0090.00317.70
8.2.90.0000.00819.05
8.2.80.0040.00417.97
8.2.70.0040.00417.63
8.2.60.0030.00517.93
8.2.50.0000.00818.10
8.2.40.0000.00720.51
8.2.30.0000.00719.21
8.2.20.0040.00417.78
8.2.10.0040.00418.17
8.2.00.0000.00718.14
8.1.310.0140.00318.65
8.1.300.0080.00019.50
8.1.290.0060.00318.88
8.1.280.0140.00725.92
8.1.270.0000.00723.99
8.1.260.0030.00526.35
8.1.250.0040.00428.09
8.1.240.0150.00722.75
8.1.230.0040.00819.03
8.1.220.0050.00317.79
8.1.210.0040.00418.77
8.1.200.0030.00817.35
8.1.190.0000.00817.35
8.1.180.0050.00318.10
8.1.170.0080.00018.51
8.1.160.0030.00322.06
8.1.150.0080.00218.80
8.1.140.0000.00719.54
8.1.130.0060.00617.43
8.1.120.0060.00617.42
8.1.110.0090.00317.41
8.1.100.0090.00317.48
8.1.90.0080.00317.45
8.1.80.0060.00717.44
8.1.70.0050.00317.46
8.1.60.0060.00617.55
8.1.50.0090.00617.43
8.1.40.0110.00317.47
8.1.30.0080.00517.57
8.1.20.0090.00417.60
8.1.10.0060.00717.38
8.1.00.0100.00317.32
8.0.300.0000.00819.09
8.0.290.0040.00416.63
8.0.280.0000.00718.25
8.0.270.0050.00317.11
8.0.260.0060.00216.85
8.0.250.0040.00416.91
8.0.240.0040.00416.85
8.0.230.0060.00216.84
8.0.220.0030.00516.84
8.0.210.0050.00316.84
8.0.200.0060.00216.91
8.0.190.0090.00316.90
8.0.180.0100.00216.86
8.0.170.0050.00616.90
8.0.160.0050.00616.82
8.0.150.0070.00416.83
8.0.140.0040.00816.83
8.0.130.0070.00315.66
8.0.120.0040.00716.87
8.0.110.0050.00516.91
8.0.100.0060.00416.81
8.0.90.0060.00416.82
8.0.80.0070.00816.83
8.0.70.0040.00716.85
8.0.60.0050.00516.83
8.0.50.0050.00516.88
8.0.30.0060.00916.92
8.0.20.0080.00817.25
8.0.10.0060.00817.12
8.0.00.0100.00816.98
7.4.330.0110.00116.48
7.4.320.0110.00016.79
7.4.300.0060.00616.64
7.4.290.0080.00616.65
7.4.280.0110.00216.70
7.4.270.0070.00616.68
7.4.260.0080.00316.66
7.4.250.0080.00316.65
7.4.240.0090.00516.67
7.4.230.0050.00716.61
7.4.220.0080.00916.65
7.4.210.0110.00416.66
7.4.200.0060.00616.62
7.4.190.0090.00616.70
7.4.180.0090.00516.82
7.4.160.0080.00716.58
7.4.150.0120.00317.02
7.4.140.0110.00717.30
7.4.130.0100.00716.69
7.4.120.0110.00516.73
7.4.110.0100.00716.83
7.4.100.0120.00516.81
7.4.90.0140.00316.76
7.4.80.0130.01417.47
7.4.70.0170.00416.80
7.4.60.0100.00816.80
7.4.50.0140.00716.77
7.4.40.0130.00716.78
7.4.30.0070.00916.79
7.4.20.0070.01016.66
7.4.10.0120.00516.32
7.4.00.0070.00816.65
7.3.330.0080.00415.39
7.3.320.0060.00615.45
7.3.310.0050.00616.38
7.3.300.0100.00316.42
7.3.290.0120.00516.37
7.3.280.0080.01116.32
7.3.270.0100.00616.99
7.3.260.0150.00616.71
7.3.250.0100.00816.58
7.3.240.0120.00616.62
7.3.230.0120.00816.72
7.3.220.0150.00316.82
7.3.210.0170.01016.67
7.3.200.0140.01216.65
7.3.190.0120.00616.65
7.3.180.0150.00916.70
7.3.170.0120.00616.72
7.3.160.0070.01016.68
7.3.150.0130.00316.84
7.3.140.0130.00516.73
7.3.130.0120.00616.30
7.3.120.0090.00816.27
7.3.110.0100.00616.27
7.3.100.0090.00716.29
7.3.90.0070.00916.37
7.3.80.0100.00616.23
7.3.70.0100.00716.29
7.3.60.0090.00816.37
7.3.50.0110.00716.37
7.3.40.0100.00516.35
7.3.30.0100.00616.35
7.3.20.0110.00617.30
7.3.10.0110.00617.32
7.3.00.0130.00917.23
7.2.340.0150.00716.84
7.2.330.0230.01216.78
7.2.320.0150.01116.80
7.2.310.0210.00816.81
7.2.300.0230.01016.81
7.2.290.0170.00516.78
7.2.280.0160.00616.89
7.2.270.0150.00716.76
7.2.260.0120.01016.40
7.2.250.0110.00916.49
7.2.240.0110.00816.46
7.2.230.0130.00616.46
7.2.220.0140.00616.42
7.2.210.0130.00616.44
7.2.200.0130.00816.50
7.2.190.0150.00716.40
7.2.180.0120.00716.45
7.2.170.0120.00816.46
7.2.160.0120.00816.46
7.2.150.0130.01017.51
7.2.140.0150.00417.48
7.2.130.0130.00617.54
7.2.120.0120.00617.55
7.2.110.0130.00717.52
7.2.100.0250.00716.99
7.2.90.0210.00816.97
7.2.80.0230.00717.03
7.2.70.0240.00717.09
7.2.60.0180.00717.00
7.2.50.0200.01017.04
7.2.40.0250.00517.11
7.2.30.0280.00517.13
7.2.20.0250.00617.13
7.2.10.0220.00817.18
7.2.00.0210.01017.17
7.1.330.0320.00516.59
7.1.320.0110.00716.57
7.1.310.0130.00816.61
7.1.300.0120.00716.67
7.1.290.0120.00716.49
7.1.280.0110.00616.64
7.1.270.0100.00816.60
7.1.260.0110.00716.54
7.1.250.0150.00416.60
7.1.240.0160.00516.58
7.1.230.0130.00616.53
7.1.220.0200.00816.16
7.1.210.0270.00416.18
7.1.200.0190.00616.05
7.1.190.0220.00516.11
7.1.180.0230.00616.09
7.1.170.0170.00816.12
7.1.160.0210.00616.07
7.1.150.0190.00716.11
7.1.140.0220.00716.20
7.1.130.0210.00616.21
7.1.120.0200.00716.15
7.1.110.0220.00716.36
7.1.100.0160.00916.40
7.1.90.0180.00816.32
7.1.80.0170.00916.37
7.1.70.0310.00616.12
7.1.60.0260.00822.82
7.1.50.0280.00822.85
7.1.40.0390.00822.64
7.1.30.0260.00822.76
7.1.20.0210.01122.70
7.1.10.0210.00715.91
7.1.00.0190.00615.94
7.0.330.0160.00516.35
7.0.320.0120.00616.38
7.0.310.0180.00915.86
7.0.300.0210.00815.83
7.0.290.0200.00815.87
7.0.280.0230.00815.94
7.0.270.0220.00715.95
7.0.260.0200.00615.93
7.0.250.0160.01016.12
7.0.240.0150.00816.13
7.0.230.0200.00716.13
7.0.220.0190.00616.08
7.0.210.0200.00815.83
7.0.200.0180.00815.82
7.0.190.0220.00515.90
7.0.180.0200.00715.71
7.0.170.0170.00815.70
7.0.160.0150.01015.72
7.0.150.0230.00615.80
7.0.140.0160.00915.72
7.0.130.0210.00715.83
7.0.120.0190.00715.79
7.0.110.0170.00715.71
7.0.100.0200.00615.72
7.0.90.0240.00515.75
7.0.80.0210.00815.80
7.0.70.0200.00915.79
7.0.60.0190.00815.63
7.0.50.0200.00615.79
7.0.40.0190.00815.54
7.0.30.0170.00815.55
7.0.20.0160.00915.53
7.0.10.0170.00815.57
7.0.00.0160.00715.48
5.6.400.0080.01016.13
5.6.390.0090.00916.00
5.6.380.0110.00816.05
5.6.370.0090.00915.93
5.6.360.0090.00916.02
5.6.350.0130.00816.06
5.6.340.0110.00816.09
5.6.330.0110.00716.08
5.6.320.0080.01015.95
5.6.310.0110.00816.08
5.6.300.0110.02116.91
5.6.290.0130.01816.99
5.6.280.0110.02217.02
5.6.270.0100.02416.96
5.6.260.0140.01817.05
5.6.250.0120.02117.02
5.6.240.0130.02017.04
5.6.230.0140.01817.01
5.6.220.0130.02217.04
5.6.210.0130.02217.02
5.6.200.0120.02417.00
5.6.190.0130.02417.01
5.6.180.0150.02216.97
5.6.170.0120.02117.01
5.6.160.0120.02217.04
5.6.150.0120.02016.99
5.6.140.0110.02317.01
5.6.130.0140.02116.99
5.6.120.0130.02317.01
5.6.110.0130.02216.97
5.6.100.0120.02217.00
5.6.90.0090.02116.94
5.6.80.0110.02016.77
5.6.70.0100.01916.77
5.6.60.0110.02616.78
5.6.50.0110.02216.72
5.6.40.0110.02116.82
5.6.30.0100.02316.81
5.6.20.0120.02016.72
5.6.10.0110.02316.76
5.6.00.0100.02316.74
5.5.380.0130.02116.00
5.5.370.0120.02116.06
5.5.360.0170.02216.07
5.5.350.0120.02316.01
5.5.340.0160.02116.10
5.5.330.0140.02216.13
5.5.320.0120.02816.14
5.5.310.0140.02716.17
5.5.300.0150.02116.15
5.5.290.0110.02316.15
5.5.280.0150.02316.19
5.5.270.0150.02116.14
5.5.260.0150.02116.08
5.5.250.0130.02416.09
5.5.240.0140.02116.02
5.5.230.0130.02515.98
5.5.220.0130.01915.90
5.5.210.0140.02115.95
5.5.200.0120.02515.91
5.5.190.0140.02215.95
5.5.180.0130.02115.93
5.5.170.0150.00516.04
5.5.160.0120.02215.84
5.5.150.0130.02215.97
5.5.140.0140.02415.90
5.5.130.0130.02515.94
5.5.120.0150.01915.88
5.5.110.0130.02115.89
5.5.100.0140.02315.86
5.5.90.0140.02415.98
5.5.80.0130.02215.92
5.5.70.0120.02015.92
5.5.60.0140.02215.92
5.5.50.0120.02415.94
5.5.40.0120.02215.84
5.5.30.0110.02315.90
5.5.20.0140.02015.90
5.5.10.0120.01915.83
5.5.00.0120.02215.88

preferences:
82.93 ms | 403 KiB | 5 Q