3v4l.org

run code in 300+ PHP versions simultaneously
<?php $path = parse_url('http://www.mywebsite/456754567/531613490.htm?menu=contact', PHP_URL_PATH); $pathParts = explode('/', $parts); $fullFilename = array_pop($pathParts); // probably use something like lastIndexOf() $filename = substr($fullFilename, 0, strpos($fullFilename, '.')); var_dump( $filename );

preferences:
67.04 ms | 402 KiB | 5 Q