note 74563 added to function.preg-match

From: Date: Tue, 17 Apr 2007 16:04:31 +0000
Subject: note 74563 added to function.preg-match
Groups: php.notes 
Request: Send a blank email to php-notes+get-125525@lists.php.net to get a copy of this message
preg_match not only returns FALSE when there is an error, but also if the subject string you want to match against is empty. I.e. an empty subject string is considered to be an error. Just in case you come across testing the return value of preg_match against FALSE and wonder why an error occurs in some cases. ---- Server IP: 217.13.201.10 Probable Submitter: 217.110.237.86 ---- Manual Page -- http://www.php.net/manual/en/function.preg-match.php Edit -- https://master.php.net/note/edit/74563 Del: integrated -- https://master.php.net/note/delete/74563/integrated Del: useless -- https://master.php.net/note/delete/74563/useless Del: bad code -- https://master.php.net/note/delete/74563/bad+code Del: spam -- https://master.php.net/note/delete/74563/spam Del: non-english -- https://master.php.net/note/delete/74563/non-english Del: in docs -- https://master.php.net/note/delete/74563/in+docs Del: other reasons-- https://master.php.net/note/delete/74563 Reject -- https://master.php.net/note/reject/74563 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#125525) next »