3v4l.org

run code in 300+ PHP versions simultaneously
<?php $input = array( 'abc' => 0, 'foo-bcd' => 1, 'foo-def' => 1, 'foo-xyz' => 0, ); $filtered = array_filter($input, function ($key) { return strpos($key, 'foo-') === 0; }, ARRAY_FILTER_USE_KEY); print_r($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.3.130.0040.00418.47
8.3.120.0060.00320.75
8.3.110.0070.00320.94
8.3.100.0080.00324.06
8.3.90.0040.00426.77
8.3.80.0080.00416.38
8.3.70.0150.00616.58
8.3.60.0140.00416.38
8.3.50.0090.00916.52
8.3.40.0080.00818.61
8.3.30.0080.01020.78
8.3.20.0080.00321.84
8.3.10.0050.00922.79
8.3.00.0070.00723.29
8.2.250.0080.00016.55
8.2.240.0000.00918.98
8.2.230.0120.00322.58
8.2.220.0090.00037.54
8.2.210.0040.00426.77
8.2.200.0060.00318.16
8.2.190.0040.01516.58
8.2.180.0120.00925.92
8.2.170.0070.00719.01
8.2.160.0100.00822.96
8.2.150.0070.00624.31
8.2.140.0070.00523.81
8.2.130.0090.00324.56
8.2.120.0050.00921.43
8.2.110.0080.01021.74
8.2.100.0090.00720.34
8.2.90.0100.00420.39
8.2.80.0040.01020.81
8.2.70.0070.00720.23
8.2.60.0100.00220.50
8.2.50.0030.00820.44
8.2.40.0050.00720.36
8.2.30.0030.00821.05
8.2.20.0050.00720.51
8.2.10.0040.00720.53
8.2.00.0050.00720.60
8.1.300.0090.00019.96
8.1.290.0060.00330.84
8.1.280.0070.00725.92
8.1.270.0070.00423.48
8.1.260.0080.00524.66
8.1.250.0100.00225.53
8.1.240.0030.01023.44
8.1.230.0130.00223.44
8.1.220.0030.00820.37
8.1.210.0100.00120.87
8.1.200.0070.00520.16
8.1.190.0060.00620.09
8.1.180.0060.00520.53
8.1.170.0060.00520.29
8.1.160.0090.00220.96
8.1.150.0070.00421.49
8.1.140.0080.00521.24
8.1.130.0080.00321.86
8.1.120.0080.00520.16
8.1.110.0050.00820.18
8.1.100.0130.00020.19
8.1.90.0090.00619.27
8.1.80.0110.00219.23
8.1.70.0070.00519.26
8.1.60.0070.00719.35
8.1.50.0100.00319.30
8.1.40.0070.00719.35
8.1.30.0080.00618.95
8.1.20.0070.00618.98
8.1.10.0070.00618.86
8.1.00.0110.00318.79
8.0.300.0110.00220.87
8.0.290.0090.00719.86
8.0.280.0110.00820.69
8.0.270.0090.00519.86
8.0.260.0150.00521.58
8.0.250.0130.00519.93
8.0.240.0190.00219.90
8.0.230.0170.00219.93
8.0.220.0090.00518.86
8.0.210.0120.00718.80
8.0.200.0160.00118.92
8.0.190.0070.00818.92
8.0.180.0120.00518.88
8.0.170.0120.00618.88
8.0.160.0090.00518.39
8.0.150.0130.00518.34
8.0.140.0140.00518.29
8.0.130.0140.00117.48
8.0.120.0080.00617.37
8.0.110.0090.00517.34
8.0.100.0110.00317.30
8.0.90.0090.00317.17
8.0.80.0070.00617.21
8.0.70.0060.00517.12
8.0.60.0090.00317.18
8.0.50.0070.00417.11
8.0.30.0060.00717.05
8.0.20.0080.00817.22
8.0.10.0100.00517.21
8.0.00.0080.00617.17
7.4.330.0050.00517.78
7.4.320.0080.00919.77
7.4.300.0170.00418.62
7.4.290.0140.00818.66
7.4.280.0150.00918.66
7.4.270.0140.00618.12
7.4.260.0110.00718.09
7.4.250.0100.00417.05
7.4.240.0110.00217.12
7.4.230.0100.00517.02
7.4.220.0130.00316.84
7.4.210.0070.00616.89
7.4.200.0080.00616.84
7.4.190.0100.00417.03
7.4.180.0090.00516.96
7.4.160.0100.00516.78
7.4.150.0090.00616.81
7.4.140.0090.00717.04
7.4.130.0090.00616.71
7.4.120.0090.00716.61
7.4.110.0070.00716.61
7.4.100.0080.00616.73
7.4.90.0100.00516.67
7.4.80.0100.00616.87
7.4.70.0080.00616.62
7.4.60.0080.00816.61
7.4.50.0080.00716.55
7.4.40.0100.00616.54
7.4.30.0090.00716.65
7.4.20.0100.00516.62
7.4.10.0090.00516.67
7.4.00.0110.00316.48
7.3.330.0150.00517.09
7.3.320.0150.00416.38
7.3.310.0140.00316.97
7.3.300.0110.00516.92
7.3.290.0090.00516.61
7.3.280.0100.00516.50
7.3.270.0090.00616.64
7.3.260.0080.00716.55
7.3.250.0100.00616.52
7.3.240.0100.00716.44
7.3.230.0090.00616.50
7.3.220.0090.00616.47
7.3.210.0100.00616.47
7.3.200.0090.00716.46
7.3.190.0100.00616.48
7.3.180.0110.00416.46
7.3.170.0090.00616.45
7.3.160.0110.00616.46
7.3.150.0100.00716.49
7.3.140.0100.00616.51
7.3.130.0100.00616.44
7.3.120.0080.00716.47
7.3.110.0100.00516.44
7.3.100.0090.00616.40
7.3.90.0110.00416.66
7.3.80.0080.00616.44
7.3.70.0090.00616.57
7.3.60.0100.00616.66
7.3.50.0090.00616.64
7.3.40.0100.00516.62
7.3.30.0090.00616.62
7.3.20.0100.00617.30
7.3.10.0200.00617.17
7.3.00.0090.00617.16
7.2.340.0130.00616.64
7.2.330.0130.00616.61
7.2.320.0140.00516.66
7.2.310.0130.00616.66
7.2.300.0130.00616.63
7.2.290.0120.00816.65
7.2.280.0140.00516.64
7.2.270.0160.00716.62
7.2.260.0120.00616.62
7.2.250.0110.00716.66
7.2.240.0110.00716.66
7.2.230.0130.00616.65
7.2.220.0120.00716.63
7.2.210.0130.00616.67
7.2.200.0130.00616.80
7.2.190.0140.00416.79
7.2.180.0130.00516.80
7.2.170.0130.00716.84
7.2.160.0140.00516.84
7.2.150.0140.00617.33
7.2.140.0130.00717.38
7.2.130.0140.00517.40
7.2.120.0120.00617.25
7.2.110.0130.00717.27
7.2.100.0190.00617.09
7.2.90.0170.00717.06
7.2.80.0160.00717.04
7.2.70.0250.00817.08
7.2.60.0150.00716.92
7.2.50.0350.00616.99
7.2.40.0280.00717.09
7.2.30.0250.00817.15
7.2.20.0280.00817.19
7.2.10.0280.00717.17
7.2.00.0240.00717.25
7.1.330.0130.00716.41
7.1.320.0140.00616.36
7.1.310.0150.00516.39
7.1.300.0150.00516.40
7.1.290.0150.00416.37
7.1.280.0150.00416.38
7.1.270.0130.00716.40
7.1.260.0140.00616.41
7.1.250.0140.00616.26
7.1.240.0130.00616.28
7.1.230.0220.00616.32
7.1.220.0180.00516.16
7.1.210.0270.00516.12
7.1.200.0150.00616.06
7.1.190.0200.00516.15
7.1.180.0170.00615.90
7.1.170.0190.00615.94
7.1.160.0290.00715.98
7.1.150.0260.00616.11
7.1.140.0280.00716.12
7.1.130.0330.00716.15
7.1.120.0250.00616.13
7.1.110.0240.00716.07
7.1.100.0280.00616.06
7.1.90.0270.00515.94
7.1.80.0240.00715.94
7.1.70.0250.00615.78
7.1.60.0350.00618.45
7.1.50.0260.00618.46
7.1.40.0240.00718.36
7.1.30.0270.00618.44
7.1.20.0290.00718.41
7.1.10.0250.00715.83
7.1.00.0240.00715.80
7.0.330.0140.00516.06
7.0.320.0120.00615.99
7.0.310.0170.00615.81
7.0.300.0200.00515.65
7.0.290.0280.00615.81
7.0.280.0200.00315.77
7.0.270.0250.00615.83
7.0.260.0260.00515.81
7.0.250.0250.00715.95
7.0.240.0340.00715.95
7.0.230.0290.00815.81
7.0.220.0240.00815.75
7.0.210.0250.00815.71
7.0.200.0240.00715.71
7.0.190.0240.00615.63
7.0.180.0360.00615.64
7.0.170.0220.00915.67
7.0.160.0270.00515.59
7.0.150.0260.00615.55
7.0.140.0300.00715.58
7.0.130.0260.00615.66
7.0.120.0290.00515.70
7.0.110.0230.00615.59
7.0.100.0300.00615.65
7.0.90.0230.00615.49
7.0.80.0210.00715.54
7.0.70.0210.00615.53
7.0.60.0200.00715.53
7.0.50.0250.00515.52
7.0.40.0230.00715.63
7.0.30.0290.00615.55
7.0.20.0350.00715.56
7.0.10.0240.00715.63
7.0.00.0250.00615.58
5.6.400.0110.00716.08
5.6.390.0140.00516.06
5.6.380.0090.00915.82
5.6.370.0160.00316.08
5.6.360.0110.00616.06
5.6.350.0140.00516.11
5.6.340.0130.00516.04
5.6.330.0130.00516.03
5.6.320.0130.00716.02
5.6.310.0150.00616.10
5.6.300.0130.00615.90
5.6.290.0130.00616.10
5.6.280.0120.00716.07
5.6.270.0120.00716.03
5.6.260.0140.00516.02
5.6.250.0120.00616.13
5.6.240.0140.00416.13
5.6.230.0120.00616.25
5.6.220.0110.00616.18
5.6.210.0100.00816.24
5.6.200.0130.00616.22
5.6.190.0110.00816.29
5.6.180.0120.00616.19
5.6.170.0120.00716.24
5.6.160.0140.00516.24
5.6.150.0130.00716.22
5.6.140.0120.00716.19
5.6.130.0140.00516.18
5.6.120.0120.00716.23
5.6.110.0130.00816.18
5.6.100.0120.00816.20
5.6.90.0110.00816.07
5.6.80.0140.00516.04
5.6.70.0110.00716.10
5.6.60.0130.00616.11
5.6.50.0130.00616.01
5.6.40.0130.00616.17
5.6.30.0120.00716.15
5.6.20.0100.00816.10
5.6.10.0130.00616.07
5.6.00.0140.00516.10

preferences:
28.65 ms | 403 KiB | 5 Q