3v4l.org

run code in 200+ php & hhvm versions
<?php $html = "some html More <Head> Something <title> Example.com</title> </Head> Foo bar"; $pos = stripos($html, "<title>")+7; echo substr($html, $pos, stripos($html, "</title>")-$pos);
based on GoQdN
Output for 7.1.25 - 7.4.0alpha2
Example.com