Masking Credit Card Number using PHP regex Function
This php masking function will allow first and the last 4 digits for any credit card number. You can also provide the masking letter. Credit card number has to be at least 13 character long. This is how you can call it.