@@ -135,7 +135,7 @@ public static function substring(string $s, int $start, ?int $length = null): st
135135 public static function normalize (string $ s ): string
136136 {
137137 // convert to compressed normal form (NFC)
138- if (class_exists ('Normalizer ' , false ) && ($ n = \Normalizer::normalize ($ s , \Normalizer::FORM_C )) !== false ) {
138+ if (class_exists ('Normalizer ' , autoload: false ) && ($ n = \Normalizer::normalize ($ s , \Normalizer::FORM_C )) !== false ) {
139139 $ s = $ n ;
140140 }
141141
@@ -323,7 +323,7 @@ public static function capitalize(string $s): string
323323 */
324324 public static function compare (string $ left , string $ right , ?int $ length = null ): bool
325325 {
326- if (class_exists ('Normalizer ' , false )) {
326+ if (class_exists ('Normalizer ' , autoload: false )) {
327327 $ left = \Normalizer::normalize ($ left , \Normalizer::FORM_D ); // form NFD is faster
328328 $ right = \Normalizer::normalize ($ right , \Normalizer::FORM_D ); // form NFD is faster
329329 }
@@ -688,7 +688,7 @@ public static function pcre(string $func, array $args)
688688 });
689689
690690 if (($ code = preg_last_error ()) // run-time error, but preg_last_error & return code are liars
691- && ($ res === null || !in_array ($ func , ['preg_filter ' , 'preg_replace_callback ' , 'preg_replace ' ], true ))
691+ && ($ res === null || !in_array ($ func , ['preg_filter ' , 'preg_replace_callback ' , 'preg_replace ' ], strict: true ))
692692 ) {
693693 throw new RegexpException (preg_last_error_msg ()
694694 . ' (pattern: ' . implode (' or ' , (array ) $ args [0 ]) . ') ' , $ code );
0 commit comments