preg_last_error_msg
PHP 8
preg_last_error_msg - Returns the error message of the last PCRE regex execution
Manual
preg_last_error_msg(
): string
Returns the error message of the last PCRE regex execution.
Parameters
This function has no parameters.
Return Values
Returns the error message on success, or "No error" if no error has occurred.