PCRE
PHP Manual

preg_last_error

(PHP 5 >= 5.2.0)

preg_last_error — Returns the error code of the last PCRE regex execution

Description

int preg_last_error ( void )

Returns the error code of the last PCRE regex execution.

Return Values

Returns one of the following constants (explained on their own page):


PCRE
PHP Manual