3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $str = "helloworldfoobar"; $arr = array('stam','world','mamash'); foreach($arr as $item){ if($place = strpos($str,$item)){ $str1 = substr($str,$place); echo $str1; } }
Output for 4.3.0 - 7.1.0
worldfoobar