3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ "foo" => "no", "foo_contact_firstname" => "Mark", "foo_email" => "mark@gmail.com", "foo_address1" => "91", "foo_address2" => "old road", "foo_bill" => "no", "bar" => "yes", "bar_contact_lastname" => null, "bar_telephone" => null, "bar_email" => null, "bar_address1" => null, "bar_address2" => null, "bar_address3" => null, "bar_address4" => null, "bar_address5" => null, "bar_postcode" => null, "register_contact_firstname" => null, "register_contact_lastname" => null, "register_telephone" => null, "register_email" => null, "register_address1" => null, "register_address2" => null, "register_address3" => null, "register_address4" => null, "register_address5" => null, "register_postcode" => null, ]; $test = array_filter($array, function($key) { if( ($x_pos = strpos($key, 'foo')) !== FALSE ){ return substr($key, $x_pos + 1); } }, ARRAY_FILTER_USE_KEY ); var_dump($test);

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.70.0100.00716.63
8.3.60.0110.00616.63
8.3.50.0170.00316.30
8.3.40.0070.00718.70
8.3.30.0110.00818.53
8.3.20.0050.00318.74
8.3.10.0040.00421.61
8.3.00.0040.00421.88
8.2.190.0090.00616.58
8.2.180.0110.00816.75
8.2.170.0110.01122.96
8.2.160.0040.01118.81
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0000.01019.02
8.2.120.0070.00026.35
8.2.110.0060.00321.02
8.2.100.0040.00817.77
8.2.90.0040.00417.84
8.2.80.0080.00018.04
8.2.70.0000.00817.91
8.2.60.0040.00418.22
8.2.50.0030.00618.10
8.2.40.0050.00419.18
8.2.30.0030.00519.13
8.2.20.0050.00318.12
8.2.10.0040.00418.19
8.2.00.0000.00817.71
8.1.280.0120.00925.92
8.1.270.0070.00020.29
8.1.260.0050.00326.35
8.1.250.0040.00428.09
8.1.240.0040.00817.39
8.1.230.0120.00022.45
8.1.220.0080.00017.79
8.1.210.0040.00418.87
8.1.200.0030.00717.35
8.1.190.0050.00317.35
8.1.180.0000.00918.10
8.1.170.0030.00518.30
8.1.160.0040.00418.89
8.1.150.0050.00218.82
8.1.140.0030.00520.14
8.1.130.0000.00717.50
8.1.120.0000.00717.36
8.1.110.0050.00317.52
8.1.100.0000.00717.52
8.1.90.0000.00717.46
8.1.80.0070.00017.49
8.1.70.0000.00717.43
8.1.60.0040.00417.62
8.1.50.0040.00417.49
8.1.40.0000.00817.51
8.1.30.0000.00817.65
8.1.20.0040.00417.55
8.1.10.0040.00417.45
8.1.00.0040.00417.40
8.0.300.0000.00719.65
8.0.290.0070.00016.63
8.0.280.0000.00718.47
8.0.270.0030.00317.21
8.0.260.0040.00416.66
8.0.250.0030.00316.81
8.0.240.0040.00416.92
8.0.230.0030.00516.86
8.0.220.0000.00716.77
8.0.210.0060.00316.87
8.0.200.0030.00316.97
8.0.190.0070.00016.99
8.0.180.0050.00316.95
8.0.170.0040.00416.79
8.0.160.0040.00416.78
8.0.150.0050.00316.94
8.0.140.0070.00016.84
8.0.130.0050.00013.33
8.0.120.0000.00716.84
8.0.110.0000.00716.67
8.0.100.0040.00416.80
8.0.90.0070.00016.91
8.0.80.0090.01016.89
8.0.70.0040.00416.74
8.0.60.0070.00016.70
8.0.50.0050.00316.85
8.0.30.0090.01116.97
8.0.20.0110.00817.40
8.0.10.0030.00516.86
8.0.00.0130.00516.74
7.4.330.0000.00515.55
7.4.320.0000.00716.61
7.4.300.0050.00316.36
7.4.290.0030.00316.53
7.4.280.0000.00716.61
7.4.270.0030.00316.51
7.4.260.0030.00316.41
7.4.250.0040.00416.51
7.4.240.0000.00716.64
7.4.230.0040.00416.59
7.4.220.0000.00716.68
7.4.210.0110.00716.57
7.4.200.0030.00316.61
7.4.160.0130.00516.59
7.4.140.0100.00917.86
7.4.130.0160.01016.54
7.4.120.0090.01316.46
7.4.110.0110.00716.47
7.4.100.0030.01516.35
7.4.90.0070.01116.33
7.4.80.0060.01519.39
7.4.70.0110.00716.40
7.4.60.0070.01716.48
7.4.50.0040.01116.48
7.4.40.0090.00916.43
7.4.00.0070.00714.94
7.3.330.0020.00213.23
7.3.320.0060.00013.30
7.3.310.0020.00516.38
7.3.300.0040.00416.16
7.3.290.0000.00716.20
7.3.280.0080.01016.27
7.3.260.0130.00716.35
7.3.240.0110.00616.54
7.3.230.0100.00716.36
7.3.210.0130.00316.29
7.3.200.0070.01416.27
7.3.190.0060.00916.59
7.3.180.0070.01116.17
7.3.170.0140.00316.37
7.3.160.0140.00316.37
7.3.120.0160.00315.00
7.3.110.0000.01114.41
7.3.100.0150.00014.77
7.3.90.0000.01114.83
7.3.80.0070.00714.96
7.3.70.0070.00414.58
7.3.60.0060.00314.84
7.3.50.0040.01414.46
7.3.40.0040.01214.65
7.3.30.0070.01014.77
7.3.20.0080.00816.42
7.3.10.0040.00816.55
7.3.00.0040.01116.68
7.2.330.0100.01016.46
7.2.320.0070.01016.53
7.2.310.0160.00016.70
7.2.300.0170.00716.64
7.2.290.0120.00616.54
7.2.250.0030.01314.96
7.2.240.0030.01414.85
7.2.230.0100.00615.22
7.2.220.0060.00914.95
7.2.210.0110.00414.96
7.2.200.0030.00714.91
7.2.190.0070.00714.98
7.2.180.0030.01015.07
7.2.170.0070.01114.88
7.2.110.0250.00814.83
7.2.100.0240.00614.65
7.2.90.3350.00314.78
7.2.80.3470.01014.61
7.2.70.3350.01014.74
7.2.60.3290.01015.18
7.2.50.3200.00714.81
7.2.40.2940.00615.09
7.2.30.3710.01015.07
7.2.20.1200.01014.79
7.2.10.3450.00314.95
7.2.00.3180.01614.93
7.1.330.0060.00615.63
7.1.320.0110.00016.00
7.1.310.0140.00015.86
7.1.300.0040.01115.84
7.1.290.0040.00815.88
7.1.280.0060.00915.78
7.1.270.0100.00715.67
7.1.260.0070.00715.54
7.1.230.0100.01013.98
7.1.220.3750.00313.98
7.1.210.2990.00013.93
7.1.200.3480.01013.67
7.1.190.2930.01013.84
7.1.180.3180.01613.89
7.1.170.2690.00313.74
7.1.160.3220.00714.00
7.1.150.4120.00013.79
7.1.140.2410.01313.73
7.1.130.3060.00614.01
7.1.120.3820.00613.87
7.1.110.4060.00313.82
7.1.100.4020.01013.59
7.1.90.3940.00613.72
7.1.80.3780.00313.67
7.1.70.1800.01213.81
7.1.60.3400.00632.02
7.1.50.2620.01332.01
7.1.40.0490.00631.61
7.1.30.0290.01831.89
7.1.20.0720.01331.89
7.1.10.2180.00713.83
7.1.00.1280.01013.91
5.6.380.0140.00314.27

preferences:
61.11 ms | 400 KiB | 5 Q