3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $href = "/test/link"; $file = "/media/doc/doc.pdf"; echo substr($href, -1, 1), PHP_EOL; echo pathinfo($href, PATHINFO_EXTENSION), PHP_EOL; echo substr($file, -1, 1), PHP_EOL; echo pathinfo($file, PATHINFO_EXTENSION), PHP_EOL;
Output for 4.3.10 - 4.4.9, 5.0.2 - 7.3.1
k f pdf
Output for 4.3.2 - 4.3.9, 5.0.0 - 5.0.1
k Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/m5vdl on line 6 PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/m5vdl on line 7 PHP_EOLf Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/m5vdl on line 9 PHP_EOLpdf Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/m5vdl on line 10 PHP_EOL
Output for 4.3.0 - 4.3.1
k Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/m5vdl on line 6 PHP_EOL
Process exited with code 139.