3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $str=rtrim($str); $str="ronak modi"; $str=preg_replace('/\s*$/','',$str); echo $str; ?>
based on c6147
Output for 5.6.0 - 5.6.30, hhvm-3.21.3, 7.0.0 - 7.3.0rc3
Notice: Undefined variable: str in /in/Um177 on line 2 ronak modi
Output for hhvm-3.22.0
Notice: Undefined variable: str in /in/Um177 on line -1 ronak modi
Output for hhvm-3.18.5
Notice: Undefined variable: str in /in/Um177 on line 2 Warning: rtrim() expects parameter 1 to be string, null given in /in/Um177 on line 2 ronak modi