<?php $str = '4716501731980995'; $novo = str_split($str, 4); echo $novo[0]. str_repeat('*', 8). $novo[3];
Standard input is empty
4716********0995
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!