3v4l.org

run code in 300+ PHP versions simultaneously
<?php $os =array("Mac/OSX","PC/Windows" ); $string = "Mac"; foreach ($os as $data) { echo $data; if (strpos($data,$string ) !== FALSE) { echo "Match found"; }else{ echo "not found"; } }

preferences:
25.05 ms | 404 KiB | 5 Q