in reply to Re: Golf: Replacing part of a string with "*"
in thread Golf: Replacing part of a string with "*"

If the OP wanted to hardcode the length, he could have done
substr($string,0,-4,'*'x12);

Much clearer.