Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren



_wp_can_use_pcre_u ›

Seit4.2.2
Veraltetn/v
_wp_can_use_pcre_u ( $set = null )
Zugriff:
  • private
Parameter:
  • (bool) $set - Used for testing only null : default - get PCRE/u capability false : Used for testing - return false for future calls to this function 'reset': Used for testing - restore default behavior of this function
    Erforderlich: Nein
    Standard: null
Definiert in:
Codex:

Returns whether PCRE/u (PCRE_UTF8 modifier) is available for use.



Quellcode

function _wp_can_use_pcre_u( $set = null ) {
	static $utf8_pcre = 'reset';

	if ( null !== $set ) {
		$utf8_pcre = $set;
	}

	if ( 'reset' === $utf8_pcre ) {
		$utf8_pcre = @preg_match( '/^./u', 'a' );
	}

	return $utf8_pcre;
}