3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = ['key1' => 5, 'key2' => 17]; $array = array_filter($array, function ($value, $key) { return !!preg_match('/^key\d$/', $key); });

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.0140.00018.79
8.3.30.0140.00018.84
8.3.20.0040.00420.34
8.3.10.0040.00423.36
8.3.00.0090.00019.79
8.2.170.0070.00722.96
8.2.160.0070.01319.41
8.2.150.0040.00424.18
8.2.140.0000.00924.66
8.2.130.0040.00420.95
8.2.120.0000.00826.35
8.2.110.0060.00322.19
8.2.100.0070.00418.04
8.2.90.0030.00719.22
8.2.80.0050.00317.97
8.2.70.0060.00317.50
8.2.60.0030.00517.93
8.2.50.0060.00318.07
8.2.40.0000.00822.20
8.2.30.0000.00820.56
8.2.20.0030.00517.67
8.2.10.0030.00618.10
8.2.00.0000.00818.13
8.1.270.0060.01320.33
8.1.260.0060.00328.09
8.1.250.0030.00628.09
8.1.240.0040.00423.92
8.1.230.0030.00919.61
8.1.220.0050.00317.74
8.1.210.0040.00418.77
8.1.200.0030.00617.48
8.1.190.0000.00817.25
8.1.180.0080.00018.10
8.1.170.0060.00318.64
8.1.160.0000.00720.77
8.1.150.0040.00418.82
8.1.140.0040.00419.58
8.1.130.0000.00817.75
8.1.120.0070.00017.37
8.1.110.0000.01017.49
8.1.100.0050.00317.46
8.1.90.0050.00217.36
8.1.80.0050.00217.34
8.1.70.0000.00717.45
8.1.60.0080.00017.60
8.1.50.0040.00417.45
8.1.40.0030.00617.42
8.1.30.0050.00517.66
8.1.20.0000.00817.68
8.1.10.0000.00717.52
8.1.00.0080.00017.55
8.0.300.0040.00418.77
8.0.290.0080.00016.75
8.0.280.0030.00518.30
8.0.270.0000.00717.13
8.0.260.0040.00417.23
8.0.250.0000.00816.95
8.0.240.0040.00416.94
8.0.230.0030.00317.00
8.0.220.0000.00816.90
8.0.210.0000.00816.91
8.0.200.0030.00316.95
8.0.190.0000.00716.93
8.0.180.0040.00416.96
8.0.170.0060.00316.95
8.0.160.0030.00616.86
8.0.150.0070.00017.00
8.0.140.0040.00416.80
8.0.130.0030.00313.38
8.0.120.0040.00416.95
8.0.110.0050.00216.94
8.0.100.0040.00416.85
8.0.90.0030.00316.79
8.0.80.0070.01016.98
8.0.70.0070.00016.90
8.0.60.0000.00816.99
8.0.50.0000.00816.87
8.0.30.0120.00716.95
8.0.20.0140.00617.40
8.0.10.0040.00416.95
8.0.00.0110.00816.68
7.4.330.0000.00516.67
7.4.320.0030.00316.52
7.4.300.0030.00316.65
7.4.290.0070.00016.53
7.4.280.0060.00316.42
7.4.270.0000.00616.43
7.4.260.0040.00416.47
7.4.250.0040.00416.61
7.4.240.0000.00716.59
7.4.230.0040.00316.48
7.4.220.0130.01016.54
7.4.210.0070.01016.64
7.4.200.0000.00716.49
7.4.160.0040.01116.61
7.4.150.0030.01717.40
7.4.140.0080.01117.86
7.4.130.0110.00516.55
7.4.120.0100.01116.45
7.4.110.0130.00416.57
7.4.100.0140.01016.50
7.4.90.0060.01016.52
7.4.80.0140.00619.39
7.4.70.0100.00716.59
7.4.60.0030.01316.51
7.4.50.0090.00916.47
7.4.40.0130.00316.65
7.4.30.0180.00316.46
7.4.00.0110.00314.87
7.3.330.0040.00413.17
7.3.320.0050.00013.14
7.3.310.0030.00316.20
7.3.300.0030.00316.32
7.3.290.0060.01016.33
7.3.280.0090.00916.25
7.3.270.0060.00917.40
7.3.260.0120.00616.53
7.3.250.0090.00916.41
7.3.240.0120.00516.52
7.3.230.0190.00016.39
7.3.210.0060.01016.29
7.3.200.0110.00616.30
7.3.190.0040.01216.32
7.3.180.0060.00916.20
7.3.170.0100.00716.39
7.3.160.0100.01016.40
7.2.330.0100.00716.56
7.2.320.0100.00716.58
7.2.310.0100.00716.63
7.2.300.0140.00316.64
7.2.290.0070.01016.28
7.2.60.0070.00716.88
7.2.00.0120.00619.42
7.1.200.0090.00315.62
7.1.100.0040.00718.17
7.1.70.0000.01117.13
7.1.60.0040.01819.05
7.1.50.0070.00316.96
7.1.00.0070.07322.46
7.0.200.0400.00614.64
7.0.60.0170.07019.84
7.0.50.0070.06717.89
7.0.40.0100.08320.13
7.0.30.0200.05320.10
7.0.20.0330.07720.08
7.0.10.0030.06720.12
7.0.00.0000.04320.23
5.6.280.0000.05021.11
5.6.210.0230.05720.71
5.6.200.0070.06018.16
5.6.190.0000.09720.57
5.6.180.0230.07720.68
5.6.170.0270.03720.44
5.6.160.0130.05020.71
5.6.150.0070.05318.18
5.6.140.0070.04018.21
5.6.130.0070.05318.18
5.6.120.0170.05320.99
5.6.110.0070.04021.04
5.6.100.0100.08321.11
5.6.90.0130.06021.11
5.6.80.0100.07320.38
5.5.350.0170.03320.40
5.5.340.0070.05717.95
5.5.330.0070.08020.41
5.5.320.0070.05020.34
5.5.310.0200.06020.28
5.5.300.0030.08318.07
5.5.290.0030.05317.99
5.5.280.0000.09320.98
5.5.270.0070.04720.79
5.5.260.0130.08320.87
5.5.250.0130.07720.48
5.5.240.0230.07320.16

preferences:
39.42 ms | 400 KiB | 5 Q