3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $path_parts = pathinfo('/www/htdocs/inc/lib.inc.php'); echo $path_parts['dirname'], "\n"; echo $path_parts['basename'], "\n"; echo $path_parts['extension'], "\n"; echo $path_parts['filename'], "\n"; // since PHP 5.2.0 ?>
Output for 5.2.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
/www/htdocs/inc lib.inc.php php lib.inc
Output for 4.3.0 - 5.1.6
/www/htdocs/inc lib.inc.php php Notice: Undefined index: filename in /in/DT9TF on line 8