3v4l.org

run code in 300+ PHP versions simultaneously
<?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) ) );

preferences:
54.41 ms | 402 KiB | 5 Q