Mask credit card number in PHP
<p>I have credit card number which I want to mask as below:</p>

<pre><code>$cc = 1234123412341234

echo cc_masking($cc)

1234XXXXXXXX1234

function cc_masking($number) {.....}
</code></pre>

<p>Please suggest the regular expression for this.</p>
