note 126519 added to reference.pcre.pattern.modifiers

From: Date: Wed, 20 Oct 2021 13:02:51 +0000
Subject: note 126519 added to reference.pcre.pattern.modifiers
Groups: php.notes 
Request: Send a blank email to php-notes+get-217090@lists.php.net to get a copy of this message
Note that you might need to actually add "u" (PCRE_UTF8) when you migrate code from PHP5 to PHP7. <?php // don't work in PHP7, works fine in PHP5 $re = "/[^ \t\n](?=\n[^ \t\n])/msS"; // works in PHP7. //$re = "/[^ \t\n](?=\n[^ \t\n])/msSu"; $subject = ' zaż . '; preg_match($re, $subject, $matches); // matches supposed to get "ż" // returns 65533 (�) in matches in PHP7 var_export($matches); ?> ---- Server IP: 45.112.84.4 Probable Submitter: 45.112.85.242 (proxied: 46.175.231.133) ---- Manual Page -- https://php.net/manual/en/reference.pcre.pattern.modifiers.php Edit -- https://main.php.net/note/edit/126519 Del: integrated -- https://main.php.net/note/delete/126519/integrated Del: useless -- https://main.php.net/note/delete/126519/useless Del: bad code -- https://main.php.net/note/delete/126519/bad+code Del: spam -- https://main.php.net/note/delete/126519/spam Del: non-english -- https://main.php.net/note/delete/126519/non-english Del: in docs -- https://main.php.net/note/delete/126519/in+docs Del: other reasons-- https://main.php.net/note/delete/126519 Reject -- https://main.php.net/note/reject/126519 Search -- https://main.php.net/manage/user-notes.php

« previous php.notes (#217090) next »