note 102409 added to function.preg-last-error

From: Date: Sat, 12 Feb 2011 17:22:17 +0000
Subject: note 102409 added to function.preg-last-error
Groups: php.notes 
Request: Send a blank email to php-notes+get-176929@lists.php.net to get a copy of this message
here's the code to check for all errors <?php if (preg_last_error() == PREG_NO_ERROR) { print 'There is no error.'; } else if (preg_last_error() == PREG_INTERNAL_ERROR) { print 'There is an internal error!'; } else if (preg_last_error() == PREG_BACKTRACK_LIMIT_ERROR) { print 'Backtrack limit was exhausted!'; } else if (preg_last_error() == PREG_RECURSION_LIMIT_ERROR) { print 'Recursion limit was exhausted!'; } else if (preg_last_error() == PREG_BAD_UTF8_ERROR) { print 'Bad UTF8 error!'; } else if (preg_last_error() == PREG_BAD_UTF8_ERROR) { print 'Bad UTF8 offset error!'; } ?> ---- Server IP: 69.147.83.197 Probable Submitter: 212.108.146.193 ---- Manual Page -- http://www.php.net/manual/en/function.preg-last-error.php Edit -- https://master.php.net/note/edit/102409 Del: integrated -- https://master.php.net/note/delete/102409/integrated Del: useless -- https://master.php.net/note/delete/102409/useless Del: bad code -- https://master.php.net/note/delete/102409/bad+code Del: spam -- https://master.php.net/note/delete/102409/spam Del: non-english -- https://master.php.net/note/delete/102409/non-english Del: in docs -- https://master.php.net/note/delete/102409/in+docs Del: other reasons-- https://master.php.net/note/delete/102409 Reject -- https://master.php.net/note/reject/102409 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#176929) next »