3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $path = "/some/file/path.php"; echo "pathinfo()".PHP_EOL; print_r(pathinfo($path)); echo PHP_EOL; echo "basename(): ".PHP_EOL. basename($path);
Output for 5.2.0 - 7.1.0
pathinfo() Array ( [dirname] => /some/file [basename] => path.php [extension] => php [filename] => path ) basename(): path.php
Output for 4.3.10 - 4.4.9, 5.0.2 - 5.1.6
pathinfo() Array ( [dirname] => /some/file [basename] => path.php [extension] => php ) basename(): path.php
Output for 4.3.0 - 4.3.9, 5.0.0 - 5.0.1
pathinfo()PHP_EOLArray ( [dirname] => /some/file [basename] => path.php [extension] => php ) PHP_EOLbasename(): PHP_EOLpath.php