正则星号隐藏*的后4位

$name = preg_replace("/^(d+)(d{4})$/", '$1****', $name);

结果会是 1380013****

原文地址:https://www.cnblogs.com/chy1000/p/4860443.html