3v4l.org

run code in 300+ PHP versions simultaneously
<?php $parts = parse_url('http://www.mywebsite/456754567/531613490.htm?menu=contact', PHP_URL_PATH); $fullFilename = explode('/', $parts)[2]; // this gives 531....htm $filename = substr($fullFilename, 0, strpos($fullFilename, '.')); var_dump( $filename );

preferences:
43.6 ms | 402 KiB | 5 Q