3v4l.org

run code in 300+ PHP versions simultaneously
<?php $list = [ [ 'name' => 'this is items name', 'number' => 1, 'description' => 'this is description', 'id' => 'just some id' ], [ 'name' => 'this is items name2', 'number' => 1, 'description' => 'this is description2', 'id' => 'just some id' ], 'test' => [ 'name' => 'this is items name3', 'number' => 1, 'description' => 'do not find this one', 'id' => 'just some id' ], 'preserve_this_key_please' => [ 'name' => 'this is items name4', 'number' => 1, 'description' => 'this is something, key preserved', 'id' => 'just some id' ], ]; function getKeysBy($array, $key, $value){ return array_keys(array_filter($array,function($val) use ($key,$value) { //return $val[$key] === $value;//exact match return strpos($val[$key], $value) === 0; } )); } var_dump(getKeysBy($list, 'description', 'this is'));

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.60.0090.00618.30
8.3.50.0170.00018.04
8.3.40.0130.00618.75
8.3.30.0090.00618.84
8.3.20.0080.00319.15
8.3.10.0040.00423.71
8.3.00.0040.00423.66
8.2.180.0060.00916.63
8.2.170.0000.01522.96
8.2.160.0070.00720.35
8.2.150.0070.00025.66
8.2.140.0050.00324.66
8.2.130.0040.00420.35
8.2.120.0040.00426.35
8.2.110.0030.00722.20
8.2.100.0110.00017.84
8.2.90.0080.00018.09
8.2.80.0030.00617.97
8.2.70.0000.00818.05
8.2.60.0080.00418.34
8.2.50.0000.00918.10
8.2.40.0070.00019.33
8.2.30.0000.00720.73
8.2.20.0000.00818.14
8.2.10.0040.00418.03
8.2.00.0070.00019.55
8.1.280.0110.00425.92
8.1.270.0030.00524.66
8.1.260.0060.00326.35
8.1.250.0040.00428.09
8.1.240.0100.00722.14
8.1.230.0080.00421.08
8.1.220.0030.00517.79
8.1.210.0000.00818.77
8.1.200.0000.00917.22
8.1.190.0080.00017.36
8.1.180.0050.00318.10
8.1.170.0040.00418.72
8.1.160.0050.00222.19
8.1.150.0000.00818.89
8.1.140.0000.00719.05
8.1.130.0040.00419.07
8.1.120.0000.00717.36
8.1.110.0040.00417.45
8.1.100.0000.00717.45
8.1.90.0040.00417.42
8.1.80.0050.00317.45
8.1.70.0030.00317.46
8.1.60.0080.00017.43
8.1.50.0080.00017.51
8.1.40.0040.00417.40
8.1.30.0000.00817.67
8.1.20.0040.00417.53
8.1.10.0000.00717.44
8.1.00.0000.00817.57
8.0.300.0000.00919.50
8.0.290.0000.00816.75
8.0.280.0000.00718.44
8.0.270.0030.00317.13
8.0.260.0060.00017.16
8.0.250.0070.00016.96
8.0.240.0030.00316.93
8.0.230.0000.00716.95
8.0.220.0030.00516.89
8.0.210.0030.00516.92
8.0.200.0030.00316.93
8.0.190.0070.00016.95
8.0.180.0000.00916.88
8.0.170.0040.00416.92
8.0.160.0000.00816.91
8.0.150.0000.00716.78
8.0.140.0000.00816.73
8.0.130.0070.00013.29
8.0.120.0030.00516.83
8.0.110.0070.00016.77
8.0.100.0040.00416.76
8.0.90.0020.00516.68
8.0.80.0150.00416.88
8.0.70.0000.00717.00
8.0.60.0000.00816.86
8.0.50.0040.00416.79
8.0.30.0140.00517.06
8.0.20.0120.00617.40
8.0.10.0000.00716.90
8.0.00.0170.01016.73
7.4.330.0000.00515.55
7.4.320.0030.00316.55
7.4.300.0040.00416.55
7.4.290.0090.00016.50
7.4.280.0030.00516.49
7.4.270.0030.00316.59
7.4.260.0000.00716.62
7.4.250.0050.00316.48
7.4.240.0070.00016.63
7.4.230.0000.00716.64
7.4.220.0050.00316.61
7.4.210.0060.01216.52
7.4.200.0030.00516.36
7.4.160.0080.00816.65
7.4.140.0120.01217.86
7.4.130.0120.00616.61
7.4.120.0090.01016.54
7.4.110.0070.01016.55
7.4.100.0070.01416.36
7.4.90.0090.01216.35
7.4.80.0060.01119.39
7.4.70.0100.00716.49
7.4.60.0120.00916.38
7.4.50.0060.01216.46
7.4.40.0070.01116.59
7.4.00.0030.01214.90
7.3.330.0000.00613.32
7.3.320.0000.00513.32
7.3.310.0000.00716.31
7.3.300.0030.00316.23
7.3.290.0030.00316.34
7.3.280.0120.00816.29
7.3.260.0070.01016.42
7.3.240.0100.00716.45
7.3.230.0150.00016.48
7.3.210.0040.02216.49
7.3.200.0060.01016.38
7.3.190.0150.00016.38
7.3.180.0100.00616.50
7.3.170.0080.00816.30
7.3.160.0060.00916.32
7.3.120.0030.01314.52
7.3.110.0030.01014.77
7.3.100.0060.00814.80
7.3.90.0000.01514.86
7.3.80.0040.00714.73
7.3.70.0040.00814.97
7.3.60.0150.00014.91
7.3.50.0070.00314.86
7.3.40.0000.01314.94
7.3.30.0090.00314.60
7.3.20.0000.01216.42
7.3.10.0060.00916.55
7.3.00.0030.01016.58
7.2.330.0070.01716.82
7.2.320.0110.00916.78
7.2.310.0150.00316.73
7.2.300.0070.01216.77
7.2.290.0090.01516.67
7.2.250.0060.01315.04
7.2.240.0030.01714.96
7.2.230.0030.00915.01
7.2.220.0000.01415.05
7.2.210.0100.00315.06
7.2.200.0060.00615.17
7.2.190.0040.00714.70
7.2.180.0100.00714.89
7.2.170.0030.00815.05
7.2.80.0240.00714.73
7.2.70.0290.00715.11
7.2.60.0310.00615.34
7.2.50.0270.00915.26
7.2.40.0320.00315.21
7.2.30.0230.00715.17
7.2.20.0220.00915.15
7.2.10.0320.00314.76
7.2.00.0280.00314.95
7.1.330.0040.01215.65
7.1.320.0130.00315.84
7.1.310.0080.00315.77
7.1.300.0000.00815.59
7.1.290.0000.01415.90
7.1.280.0000.00815.84
7.1.270.0080.00415.64
7.1.260.0060.00615.98
7.1.200.0260.00613.95
7.1.190.0330.00313.86
7.1.180.0330.00713.88
7.1.170.0280.00313.54
7.1.160.0260.00314.07
7.1.150.0280.00313.90
7.1.140.0340.00013.80
7.1.130.0210.00813.74
7.1.120.0340.01313.70
7.1.110.0420.01014.06
7.1.100.0260.00613.98
7.1.90.0240.00713.69
7.1.80.0360.00313.91
7.1.70.0420.00614.04
7.1.60.0360.01332.02
7.1.50.0430.01031.98
7.1.40.0670.01231.93
7.1.30.0480.00331.64
7.1.20.0400.01031.53
7.1.10.0250.00613.68
7.1.00.1070.00013.85

preferences:
33.88 ms | 400 KiB | 5 Q