You are here

public static function StringUtils::hasPcreUnicodeSupport in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/zendframework/zend-stdlib/src/StringUtils.php \Zend\Stdlib\StringUtils::hasPcreUnicodeSupport()

Is PCRE compiled with Unicode support?

Return value

bool

File

vendor/zendframework/zend-stdlib/src/StringUtils.php, line 178

Class

StringUtils
Utility class for handling strings of different character encodings using available PHP extensions.

Namespace

Zend\Stdlib

Code

public static function hasPcreUnicodeSupport() {
  if (static::$hasPcreUnicodeSupport === null) {
    ErrorHandler::start();
    static::$hasPcreUnicodeSupport = defined('PREG_BAD_UTF8_OFFSET_ERROR') && preg_match('/\\pL/u', 'a') == 1;
    ErrorHandler::stop();
  }
  return static::$hasPcreUnicodeSupport;
}