More clean:
$string = '*' x 12 . substr($string,-4); # ************5678
In reply to Re: Golf: Replacing part of a string with "*"
by explorer
in thread Golf: Replacing part of a string with "*"
by kwaping
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |