3v4l.org

run code in 300+ PHP versions simultaneously
<?php $path = 'www.example.com/public_html/index.php'; $file_name = strrchr($path, "/",true); echo $file_name; // "index.php"

preferences:
39.92 ms | 402 KiB | 5 Q