note 126519 deleted from reference.pcre.pattern.modifiers by cmb

From: Date: Wed, 20 Oct 2021 13:40:55 +0000
Subject: note 126519 deleted from reference.pcre.pattern.modifiers by cmb
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-217091@lists.php.net to get a copy of this message
Note Submitter: egil at wp dot pl ---- 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); ?>

« previous php.notes (#217091) next »