note 112500 added to function.preg-last-error

From: Date: Sun, 23 Jun 2013 09:00:58 +0000
Subject: note 112500 added to function.preg-last-error
Groups: php.notes 
Request: Send a blank email to php-notes+get-195327@lists.php.net to get a copy of this message
Just an addition to my previous note: In unicode mode (with "u" modifier), PREG_BAD_UTF8_ERROR only reflects errors in the subject string. If the pattern itself contains invalid characters, preg_match() (or preg_match_all()) returns false but preg_last_error() returns 0 indicating PREG_NO_ERROR. Instead, php issues a warning: "preg_match(): Compilation failed: invalid UTF-8 string at offset 0" ---- Server IP: 212.124.37.9 Probable Submitter: 92.73.252.135 ---- Manual Page -- http://php.net/manual/en/function.preg-last-error.php Edit -- https://master.php.net/note/edit/112500 Del: integrated -- https://master.php.net/note/delete/112500/integrated Del: useless -- https://master.php.net/note/delete/112500/useless Del: bad code -- https://master.php.net/note/delete/112500/bad+code Del: spam -- https://master.php.net/note/delete/112500/spam Del: non-english -- https://master.php.net/note/delete/112500/non-english Del: in docs -- https://master.php.net/note/delete/112500/in+docs Del: other reasons-- https://master.php.net/note/delete/112500 Reject -- https://master.php.net/note/reject/112500 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#195327) next »