view->formatCreditCard($number); $number = preg_replace('/[\d]/', $replacement, substr($number, 0, -4)) . substr($number, -4); return $number; } }