3v4l.org

run code in 300+ PHP versions simultaneously
<?php function recursive_array_search($needle,$haystack) { foreach($haystack as $key=>$value) { $current_key=$key; if($needle===$value OR (is_array($value) && recursive_array_search($needle,$value) !== false)) { return $current_key; } } return false; } $arr = [ 31 => "Pelican", 29 => [ "FErQa" => [ "user_file_name" => "Pelican.jpg", "file_name" => "pelican-006.jpg", "file_path" => "/nas/content/live/mysite/wp-content/uploads/sites/2/ninja-forms/", "file_url" => "http://mysite/wp-content/uploads/sites/ ... an-006.jpg", "complete" => "1", "upload_id" => "19", ] ] ]; var_dump(recursive_array_search("/nas/content/live/mysite/wp-content/uploads/sites/2/ninja-forms/", $arr));
Output for git.master, git.master_jit, rfc.property-hooks
int(29)

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
48.2 ms | 401 KiB | 8 Q