<?php
    $str = '4716501731980995';
    $novo = str_split($str, 4);
    echo $novo[0]. str_repeat('*', 8). $novo[3];