3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $arr = array(); $arr["a"] = "A"; $arr["b"] = "B"; /*$str = array_filter($arr, function($e1){ echo $e1; return $e1; });*/ $str = array_search("B", $arr); var_dump($str);
based on cKgLW
Output for 4.3.0 - 7.2.0
string(1) "b"