src/WP_CLI/SearchReplacer.php
private function preg_error_message( $error ) {
		static $error_names = null;

		if ( null === $error_names ) {
			$definitions    = get_defined_constants( true );
			$pcre_constants = array_key_exists( 'pcre', $definitions )
				? $definitions['pcre']
				: array();
			$error_names    = array_flip( $pcre_constants );
		}

		return isset( $error_names[ $error ] )
			? $error_names[ $error ]
			: '<unknown error>';
	}
private function preg_error_message( $error ) {
		static $error_names = null;

		if ( null === $error_names ) {
			$definitions    = get_defined_constants( true );
			$pcre_constants = array_key_exists( 'pcre', $definitions )
				? $definitions['pcre']
				: array();
			$error_names    = array_flip( $pcre_constants );
		}

		return isset( $error_names[ $error ] )
			? $error_names[ $error ]
			: '<unknown error>';
	}
private function preg_error_message ( $ error ) { static $ error_names = null ; if ( null === $ error_names ) { $ definitions = get_defined_constants ( true ) ; $ pcre_constants = array_key_exists ( 'pcre' , $ definitions ) ? $ definitions [ 'pcre' ] : array ( ) ; $ error_names = array_flip ( $ pcre_constants ) ; } return isset ( $ error_names [ $ error ] ) ? $ error_names [ $ error ] : '<unknown error>' ; }
Get the PCRE error constant name from an error value.

@param  integer $error Error code.
@return string         Error constant name.
Get the PCRE error constant name from an error value .