note 93527 added to function.preg-replace-callback

From: Date: Mon, 14 Sep 2009 16:24:10 +0000
Subject: note 93527 added to function.preg-replace-callback
Groups: php.notes 
Request: Send a blank email to php-notes+get-160550@lists.php.net to get a copy of this message
If you're looking to show only the first digit and last four digits of a credit card number (4xxxxxxxxxxxx2331) use something like this: preg_replace_callback('/((.)(.*))?(.{4})/', create_function('$x', 'return $x[2].str_repeat("x", strlen($x[3])).$x[4];'), '$CCNUMBER') ---- Server IP: 69.147.83.197 Probable Submitter: 75.72.80.156 ---- Manual Page -- http://www.php.net/manual/en/function.preg-replace-callback.php Edit -- https://master.php.net/note/edit/93527 Del: integrated -- https://master.php.net/note/delete/93527/integrated Del: useless -- https://master.php.net/note/delete/93527/useless Del: bad code -- https://master.php.net/note/delete/93527/bad+code Del: spam -- https://master.php.net/note/delete/93527/spam Del: non-english -- https://master.php.net/note/delete/93527/non-english Del: in docs -- https://master.php.net/note/delete/93527/in+docs Del: other reasons-- https://master.php.net/note/delete/93527 Reject -- https://master.php.net/note/reject/93527 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#160550) next »