We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Add a new method called: "array_find"
This method could have the following signature:
function array_find(array $haystack, callable $callback): mixed {}
This method should have the same behavior as javascript's 'Array.prototype.find' method (mdn doc)
Example:
$data = ['dummy' => 'test',]; $keys = ['key1', 'dummy', 'key2']; $result = array_find($keys, fn($key) => array_key_exists($key, $data)); echo $result; // echo: dummy
N/A
Thanks
Description
Description
Add a new method called: "array_find"
This method could have the following signature:
This method should have the same behavior as javascript's 'Array.prototype.find' method (mdn doc)
Example:
PHP Version
N/A
Operating System
N/A
Thanks