3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php echo "1) ".basename("/etc/sudoers.d", ".d").PHP_EOL; echo "2) ".basename("/etc/passwd").PHP_EOL; echo "3) ".basename("/etc/").PHP_EOL; echo "4) ".basename(".").PHP_EOL; echo "5) ".basename("/");
Output for 4.3.10 - 4.4.9, 5.0.2 - 7.1.0
1) sudoers 2) passwd 3) etc 4) . 5)
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/iShti on line 2 1) sudoersPHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/iShti on line 3 2) passwdPHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/iShti on line 4 3) etcPHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/iShti on line 5 4) .PHP_EOL5)