note 88029 deleted from function.preg-last-error by danbrown
| From: | danbrown@php.net | Date: | Mon, 24 May 2010 14:04:52 +0000 |
| Subject: | note 88029 deleted from function.preg-last-error by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-169558@lists.php.net to get a copy of this message | ||
Note Submitter: luky37
----
the following function decodes this message for you:
<?php
function pcre_error_deocde() {
switch (preg_last_error()) {
case PREG_NO_ERROR:
print "pcre_error: PREG_NO_ERROR!\n";
break;
case PREG_INTERNAL_ERROR:
print "pcre_error: PREG_INTERNAL_ERROR!\n";
break;
case PREG_BACKTRACK_LIMIT_ERROR:
print "pcre_error: PREG_BACKTRACK_LIMIT_ERROR!\n";
break;
case PREG_RECURSION_LIMIT_ERROR:
print "pcre_error: PREG_RECURSION_LIMIT_ERROR!\n";
break;
case PREG_BAD_UTF8_ERROR:
print "pcre_error: PREG_BAD_UTF8_ERROR!\n";
break;
case PREG_BAD_UTF8_OFFSET_ERROR:
print "pcre_error: PREG_BAD_UTF8_OFFSET_ERROR!\n";
break;
}
}
?>