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 5.2.15 - 5.6.28, hhvm-3.12.0, 7.0.0 - 7.1.0
fbcdabcdabcdeff
Output for hhvm-3.10.0

Process exited with code 153.