3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ 'abc' => 0, 'foo-bcd' => 1, 'foo-def' => 1, 'foo-xyz' => 0, ]; $prefix = 'foo'; var_export( array_filter( $array, fn($key) => str_starts_with($key, $prefix), ARRAY_FILTER_USE_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.4.120.0110.01020.45
8.4.110.0120.00822.45
8.4.100.0130.00817.68
8.4.90.0100.00720.26
8.4.80.0080.01018.73
8.4.70.0120.00818.83
8.4.60.0110.00820.63
8.4.50.0100.00922.63
8.4.40.0120.00617.66
8.4.30.0100.00920.70
8.4.20.0110.01117.63
8.4.10.0060.00319.56
8.3.250.0140.00518.45
8.3.240.0100.00816.96
8.3.230.0120.00716.54
8.3.220.0140.00418.90
8.3.210.0080.01116.56
8.3.200.0040.00616.50
8.3.190.0080.00816.98
8.3.180.0090.00918.98
8.3.170.0090.00917.11
8.3.160.0120.00618.66
8.3.150.0060.01217.19
8.3.140.0110.00716.67
8.3.130.0030.00618.29
8.3.120.0110.00718.96
8.3.110.0080.00020.94
8.3.100.0050.00318.45
8.3.90.0030.00526.77
8.3.80.0050.00518.32
8.3.70.0110.00716.58
8.3.60.0150.00618.31
8.3.50.0100.00724.56
8.3.40.0100.00721.95
8.3.30.0060.00918.63
8.3.20.0070.00024.18
8.3.10.0050.00324.66
8.3.00.0000.00726.16
8.2.290.0120.00718.93
8.2.280.0100.00820.11
8.2.270.0060.00916.53
8.2.260.0050.00318.64
8.2.250.0070.00316.85
8.2.240.0000.01917.00
8.2.230.0030.00622.58
8.2.220.0040.00424.06
8.2.210.0090.00926.77
8.2.200.0060.00318.88
8.2.190.0060.00818.29
8.2.180.0130.00925.92
8.2.170.0110.00418.79
8.2.160.0100.00322.96
8.2.150.0080.00025.66
8.2.140.0040.00424.66
8.2.130.0000.00826.16
8.2.120.0040.00421.12
8.2.110.0070.00319.30
8.2.100.0040.00717.72
8.2.90.0080.00017.84
8.2.80.0000.00819.07
8.2.70.0000.00917.37
8.2.60.0030.00618.04
8.2.50.0050.00318.07
8.2.40.0040.00418.00
8.2.30.0000.00718.03
8.2.20.0040.00418.06
8.2.10.0030.00519.31
8.2.00.0000.00719.30
8.1.330.0130.00522.10
8.1.320.0130.00517.98
8.1.310.0030.01016.60
8.1.300.0080.00817.71
8.1.290.0110.00030.84
8.1.280.0110.00425.92
8.1.270.0080.00024.66
8.1.260.0050.00326.35
8.1.250.0040.00428.09
8.1.240.0060.00322.05
8.1.230.0040.00820.99
8.1.220.0050.00317.79
8.1.210.0040.00418.97
8.1.200.0040.00717.36
8.1.190.0040.00417.35
8.1.180.0030.00618.10
8.1.170.0030.00518.50
8.1.160.0040.00418.93
8.1.150.0050.00318.93
8.1.140.0000.00718.94
8.1.130.0000.00720.09
8.1.120.0070.00017.45
8.1.110.0070.00017.34
8.1.100.0030.00517.52
8.1.90.0030.00617.38
8.1.80.0040.00417.38
8.1.70.0030.00317.38
8.1.60.0040.00417.60
8.1.50.0000.00717.39
8.1.40.0060.00317.40
8.1.30.0030.00617.52
8.1.20.0000.00817.48
8.1.10.0050.00317.45
8.1.00.0000.00817.43
8.0.300.0000.00720.04
8.0.290.0040.00416.75
8.0.280.0000.00718.49
8.0.270.0070.00018.00
8.0.260.0060.00018.50
8.0.250.0030.00516.94
8.0.240.0000.01016.96
8.0.230.0000.00716.87
8.0.220.0030.00316.86
8.0.210.0070.00016.78
8.0.200.0030.00316.96
8.0.190.0000.00816.96
8.0.180.0000.00816.95
8.0.170.0000.00816.94
8.0.160.0040.00416.98
8.0.150.0000.00816.80
8.0.140.0040.00416.72
8.0.130.0030.00313.39
8.0.120.0000.00716.73
8.0.110.0040.00416.89
8.0.100.0040.00416.89
8.0.90.0030.00316.73
8.0.80.0050.01016.82
8.0.70.0040.00416.86
8.0.60.0040.00416.75
8.0.50.0000.00816.98
8.0.30.0140.00316.91
8.0.20.0100.01117.05
8.0.10.0040.00416.98
8.0.00.0070.01716.60
7.4.330.0000.00515.55
7.4.320.0030.00316.40
7.4.300.0060.00016.50
7.4.290.0030.00316.35
7.4.280.0000.00716.39
7.4.270.0000.00716.60
7.4.260.0030.00313.25
7.4.250.0030.00316.43
7.4.240.0040.00416.57
7.4.230.0070.00016.66
7.4.220.0000.00716.62
7.4.210.0100.00516.59
7.4.200.0080.00016.48
7.4.130.0110.01116.40
7.4.120.0130.01016.54
7.4.110.0100.00716.62
7.4.100.0140.00516.60
7.4.90.0070.01116.46
7.4.80.0080.00816.52
7.4.70.0120.00616.50
7.4.60.0210.00316.46
7.4.50.0110.00916.62
7.4.40.0130.00616.39
7.4.30.0170.00816.39
7.4.20.0140.00616.51
7.4.10.0150.00316.51
7.4.00.0040.01316.36
7.3.330.0000.00616.07
7.3.320.0050.00013.01
7.3.310.0050.00316.02
7.3.300.0000.00716.14
7.3.290.0050.01016.20
7.3.260.0080.01116.35
7.3.250.0120.00316.45
7.3.240.0090.00616.12
7.3.230.0150.00616.19
7.3.220.0140.00516.22
7.3.210.0070.01116.08
7.3.200.0140.00316.14
7.3.190.0120.00916.32
7.3.180.0070.01016.45
7.3.170.0070.01116.33
7.3.160.0110.01116.36
7.3.150.0040.01316.26
7.3.140.0040.01316.25
7.3.130.0090.00616.31
7.3.120.0080.00816.11
7.3.110.0080.01516.13
7.3.100.0110.01115.89
7.3.90.0060.01116.04
7.3.80.0120.00316.38
7.3.70.0070.01416.20
7.3.60.0100.00716.28
7.3.50.0080.00816.08
7.3.40.0080.00816.22
7.3.30.0120.00316.11
7.3.20.0030.01418.11
7.3.10.0140.00618.07
7.3.00.0080.00918.16
7.2.340.0100.01016.47
7.2.330.0090.00916.41
7.2.320.0090.00916.30
7.2.310.0120.00916.32
7.2.300.0090.00916.16
7.2.290.0100.00716.30
7.2.280.0090.00916.46
7.2.270.0120.00616.59
7.2.260.0090.00916.43
7.2.250.0060.01216.41
7.2.240.0150.00416.32
7.2.230.0090.01216.21
7.2.220.0000.02316.04
7.2.210.0110.00616.32
7.2.200.0080.00916.19
7.2.190.0060.01016.22
7.2.180.0060.01116.16
7.2.170.0080.01216.16
7.2.160.0170.00016.34
7.2.150.0050.01318.33
7.2.140.0100.00818.02
7.2.130.0080.01018.09
7.2.120.0160.00318.24
7.2.110.0100.01018.12
7.2.100.0170.00418.19
7.2.90.0100.00718.28
7.2.80.0120.00718.16
7.2.70.0090.01318.27
7.2.60.0090.01518.25
7.2.50.0140.00718.30
7.2.40.0090.01118.43
7.2.30.0110.01118.08
7.2.20.0150.00418.31
7.2.10.0170.00018.22
7.2.00.0110.00618.30

preferences:
29.59 ms | 403 KiB | 5 Q