note 125443 added to function.preg-match

From: Date: Sun, 18 Oct 2020 04:00:01 +0000
Subject: note 125443 added to function.preg-match
Groups: php.notes 
Request: Send a blank email to php-notes+get-215602@lists.php.net to get a copy of this message
preg_match() returns 1 if the pattern matches given subject, 0 if it does not, or FALSE if an error occurred. Since an error may occur unexpectedly, you should always check for a boolean false to avoid common security pitfalls: $return_value = preg_match(...); if ($return_value===false) { throw new Error('preg_match failed unexpectedly.'); } ---- Server IP: 45.112.84.4 Probable Submitter: 185.85.3.174 (proxied: 2601:1c0:c804:34d0:b0bf:1a21:3304:6127) ---- Manual Page -- http://php.net/manual/en/function.preg-match.php Edit -- https://master.php.net/note/edit/125443 Del: integrated -- https://master.php.net/note/delete/125443/integrated Del: useless -- https://master.php.net/note/delete/125443/useless Del: bad code -- https://master.php.net/note/delete/125443/bad+code Del: spam -- https://master.php.net/note/delete/125443/spam Del: non-english -- https://master.php.net/note/delete/125443/non-english Del: in docs -- https://master.php.net/note/delete/125443/in+docs Del: other reasons-- https://master.php.net/note/delete/125443 Reject -- https://master.php.net/note/reject/125443 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#215602) next »