3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $search=array("<",">","!=","<=",">="); $value = "name ** vivek "; function test($item, $key, $arr) { $str = $arr[0]; $count = $arr[1]; if( strpos($str, $item) !== FALSE ) { $found++; $matches .= $item . " "; } if ($count == $key + 1){ echo "$found search item(s) found in \"$str\": $matches\n"; } } array_walk($search, 'test', array( $value, count($search) ) );
based on EjHkS
Output for 5.0.4 - 7.3.0beta1
Notice: Undefined variable: found in /in/jpgMD on line 16 Notice: Undefined variable: matches in /in/jpgMD on line 16 search item(s) found in "name ** vivek ":
Output for 4.3.0 - 5.0.3
Notice: Undefined variable: found in /in/jpgMD on line 16 Notice: Undefined variable: matches in /in/jpgMD on line 16 search item(s) found in "name ** vivek ":