3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $count=0; var_dump(str_replace(' ', '', 'a b c ', $count)); echo($count);
Output for 5.0.0 - 7.1.0
string(3) "abc" 3
Output for 4.3.2 - 4.4.9
<br /> <b>Warning</b>: Wrong parameter count for str_replace() in <b>/in/4qP61</b> on line <b>3</b><br /> NULL 0
Output for 4.3.0 - 4.3.1
string(3) "abc" 0