static public function lastPregErrorMessage()
    {
        $error = preg_last_error();
        $errorType = 'PCRE Engine error';

        switch ($error) {

            case PREG_BACKTRACK_LIMIT_ERROR:
                $errorType = "PCRE Engine backtrack limit exceeded";
                break;

            case PREG_RECURSION_LIMIT_ERROR:
                $errorType = "PCRE Engine recursion limit exceeded";
                break;

            case PREG_BAD_UTF8_ERROR:case PREG_BAD_UTF8_OFFSET_ERROR:
                $errorType = "PCRE Engine malformed UTF-8 error";
                break;
        }
        
        return $errorType;
    }
static public function lastPregErrorMessage()
    {
        $error = preg_last_error();
        $errorType = 'PCRE Engine error';

        switch ($error) {

            case PREG_BACKTRACK_LIMIT_ERROR:
                $errorType = "PCRE Engine backtrack limit exceeded";
                break;

            case PREG_RECURSION_LIMIT_ERROR:
                $errorType = "PCRE Engine recursion limit exceeded";
                break;

            case PREG_BAD_UTF8_ERROR:case PREG_BAD_UTF8_OFFSET_ERROR:
                $errorType = "PCRE Engine malformed UTF-8 error";
                break;
        }
        
        return $errorType;
    }
static public function lastPregErrorMessage ( ) { $ error = preg_last_error ( ) ; $ errorType = 'PCRE Engine error' ; switch ( $ error ) { case PREG_BACKTRACK_LIMIT_ERROR : $ errorType = "PCRE Engine backtrack limit exceeded" ; break ; case PREG_RECURSION_LIMIT_ERROR : $ errorType = "PCRE Engine recursion limit exceeded" ; break ; case PREG_BAD_UTF8_ERROR : case PREG_BAD_UTF8_OFFSET_ERROR : $ errorType = "PCRE Engine malformed UTF-8 error" ; break ; } return $ errorType ; }
Get a meaningful message for the last PREG error that occured.

The following PREG error codes are considered by this method:

* PREG_BACKTRACK_LIMIT_ERROR
* PREG_RECURSION_LIMIT_ERROR
* PREG_BAD_UTF8_ERROR
* PREG_BAD_UTF8_OFFSET_ERROR

@return string
Get a meaningful message for the last PREG error that occured .