3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $content = '12345678 ciao come'; $start = 8; var_dump( strpos( $content, ' ', $start * (-1) ) ); var_dump( substr( $content, $start, 154 ) );
based on VB2tf
Output for 7.1.0 - 7.2.0
int(13) string(10) " ciao come"
Output for 5.3.18 - 7.0.20
Warning: strpos(): Offset not contained in string in /in/ggAhb on line 6 bool(false) string(10) " ciao come"