3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a = '123456789'; $l = count($a)-4; echo substr_replace($a, str_repeat('*', $l), 0, $l);
based on eZs3h
Output for 7.2.0
Warning: count(): Parameter must be an array or an object that implements Countable in /in/gLrNe on line 4 Warning: str_repeat(): Second argument has to be greater than or equal to 0 in /in/gLrNe on line 5 789
Output for 5.3.21 - 7.1.10
Warning: str_repeat(): Second argument has to be greater than or equal to 0 in /in/gLrNe on line 5 789