note 120067 added to function.preg-filter
| From: | forsoap at gmail dot com | Date: | Thu, 20 Oct 2016 13:14:05 +0000 |
| Subject: | note 120067 added to function.preg-filter | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-206930@lists.php.net to get a copy of this message | ||
For those who read manual not in English and figure out that example code returns not the same
result as in documentation
You need put in example patter modifier "u" to get same result:
<?php
$subject = array('1', 'а', '2', 'б', '3',
'Ð', 'Ð', '4');
// Added "u"
$pattern = array('/\d/u', '/[а-Ñ]/u', '/[1а]/u');
$replace = array('Ð:$0', 'Ð:$0', 'Ð:$0');
?>
----
Server IP: 72.52.91.14
Probable Submitter: 178.150.75.164
----
Manual Page -- http://php.net/manual/en/function.preg-filter.php
Edit -- https://master.php.net/note/edit/120067
Del: integrated -- https://master.php.net/note/delete/120067/integrated
Del: useless -- https://master.php.net/note/delete/120067/useless
Del: bad code -- https://master.php.net/note/delete/120067/bad+code
Del: spam -- https://master.php.net/note/delete/120067/spam
Del: non-english -- https://master.php.net/note/delete/120067/non-english
Del: in docs -- https://master.php.net/note/delete/120067/in+docs
Del: other reasons-- https://master.php.net/note/delete/120067
Reject -- https://master.php.net/note/reject/120067
Search -- https://master.php.net/manage/user-notes.php