3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a = []; var_dump(substr('hello', -2));
based on e1NWl
Output for 5.4.8 - 7.2.0
string(2) "lo"
Output for 5.3.18 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/jQD5Z on line 3
Process exited with code 255.