3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php echo substr('abcdef', 1); // bcdef //echo substr('abcdef', 1, 3); // bcd //echo substr('abcdef', 0, 4); // abcd //echo substr('abcdef', 0, 8); // abcdef //echo substr('abcdef', -1, 1); // f
Output for 4.3.0 - 5.0.5, 5.1.1 - 7.1.0
bcdef
Output for 5.1.0
Fatal error: fatal flex scanner internal error--end of buffer missed in /in/feifM on line 7
Process exited with code 255.