3v4l.org

run code in 300+ PHP versions simultaneously
<?php $html = "some html More <Head> Something <title> Example.com</title> <title> Example2.com</title> </Head> Foo bar"; $pos = stripos($html, "<title>")+7; echo substr($html, $pos, stripos($html, "</title>")-$pos);

preferences:
59.92 ms | 402 KiB | 5 Q