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
Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/iZFar on line 4 pathinfo()PHP_EOLArray ( [dirname] => /some/file [basename] => path.php [extension] => php ) Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/iZFar on line 7 PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/iZFar on line 9 basename()PHP_EOLpath.php