3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Everything you enter here will be executed by our servers. Try it! $str = "safsad fd sm.pfle.jpg"; echo $a = strrpos($str,"."); echo substr($str,0,$a);

preferences:
43.56 ms | 402 KiB | 5 Q