WordPress at a glance
function is not described

_wp_can_use_pcre_u() WP 4.2.2

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

No Hooks.

Return

Null. Nothing.

Usage

_wp_can_use_pcre_u( $set );
$set(true/false)
- 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
Default: null

Notes

  • Static. String. $utf8_pcre

Changelog

Since 4.2.2 Introduced.

Code of wp can use pcre u: wp-includes/compat.php WP 5.2.2

<?php
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;
}