3v4l.org

run code in 300+ PHP versions simultaneously
<?php $path = '/www/public_html/index.html'; $filename = substr($path, 0, strrpos($path, "/")); echo $filename; // "index.html" ?>

preferences:
39.61 ms | 402 KiB | 5 Q