<?php
function newGetTranslationFilesPattern($langcode = NULL) {
// The file name matches: drupal-[release version].[language code].po
// When provided the $langcode is use as language code. If not provided all
// language codes will match.
return '!drupal-[0-9a-z\.-]+' . (!empty($langcode) ? '\.' . preg_quote($langcode, '!') : '') . '\.po$!';
}
function oldGetTranslationFilesPattern($langcode = NULL) {
// The file name matches: drupal-[release version].[language code].po
// When provided the $langcode is use as language code. If not provided all
// language codes will match.
return '!drupal-[0-9a-z\.-]+\.' . (!empty($langcode) ? preg_quote($langcode, '!') : '[^\.]+') . '\.po$!';
}
print "pcre.jit = " . ini_get('pcre.jit') . "\n";
print "Old: " . preg_match(oldGetTranslationFilesPattern(), 'drupal-8.0.0.de.po') . "\n";
print "New: " . preg_match(newGetTranslationFilesPattern(), 'drupal-8.0.0.de.po') . "\n\n";
ini_set('pcre.jit', 0);
print "pcre.jit = " . ini_get('pcre.jit') . "\n";
print "Old: " . preg_match(oldGetTranslationFilesPattern(), 'drupal-8.0.0.de.po') . "\n";
print "New: " . preg_match(newGetTranslationFilesPattern(), 'drupal-8.0.0.de.po') . "\n\n";
ini_set('pcre.jit', 1);
print "pcre.jit = " . ini_get('pcre.jit') . "\n";
print "Old: " . preg_match(oldGetTranslationFilesPattern(), 'drupal-8.0.0.de.po') . "\n";
print "New: " . preg_match(newGetTranslationFilesPattern(), 'drupal-8.0.0.de.po') . "\n\n";
preferences:
46.53 ms | 402 KiB | 5 Q