3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $filename = basename( “/home/james/docs/index.html” );
Output for 7.1.0
Notice: Use of undefined constant “ - assumed '“' in /in/9iTMm on line 2 Notice: Use of undefined constant home - assumed 'home' in /in/9iTMm on line 2 Warning: A non-numeric value encountered in /in/9iTMm on line 2 Warning: A non-numeric value encountered in /in/9iTMm on line 2 Warning: Division by zero in /in/9iTMm on line 2 Notice: Use of undefined constant james - assumed 'james' in /in/9iTMm on line 2 Warning: A non-numeric value encountered in /in/9iTMm on line 2 Warning: Division by zero in /in/9iTMm on line 2 Notice: Use of undefined constant docs - assumed 'docs' in /in/9iTMm on line 2 Warning: A non-numeric value encountered in /in/9iTMm on line 2 Warning: Division by zero in /in/9iTMm on line 2 Notice: Use of undefined constant index - assumed 'index' in /in/9iTMm on line 2 Warning: A non-numeric value encountered in /in/9iTMm on line 2 Warning: Division by zero in /in/9iTMm on line 2 Notice: Use of undefined constant html” - assumed 'html”' in /in/9iTMm on line 2
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.0.14
Notice: Use of undefined constant “ - assumed '“' in /in/9iTMm on line 2 Notice: Use of undefined constant home - assumed 'home' in /in/9iTMm on line 2 Warning: Division by zero in /in/9iTMm on line 2 Notice: Use of undefined constant james - assumed 'james' in /in/9iTMm on line 2 Warning: Division by zero in /in/9iTMm on line 2 Notice: Use of undefined constant docs - assumed 'docs' in /in/9iTMm on line 2 Warning: Division by zero in /in/9iTMm on line 2 Notice: Use of undefined constant index - assumed 'index' in /in/9iTMm on line 2 Warning: Division by zero in /in/9iTMm on line 2 Notice: Use of undefined constant html” - assumed 'html”' in /in/9iTMm on line 2