3v4l.org

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

preferences:
74.98 ms | 402 KiB | 5 Q