3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $rest = substr("abcdef", 6, -2); $rest1 = substr("abcdef", 6, 4); var_dump($rest); var_dump($rest1);
Output for 7.0.0 - 7.1.10
bool(false) string(0) ""
Output for hhvm-3.18.5 - 3.22.0
string(0) "" string(0) ""
Output for 5.6.0 - 5.6.30
bool(false) bool(false)