Commit 3f5baab5a99 for php.net
commit 3f5baab5a99c37c81f5578e551814346daa4c1f6
Merge: c4a22659f0b 35b09eaead2
Author: Ilia Alshanetsky <ilia@ilia.ws>
Date: Fri Aug 28 09:15:57 2026 -0400
Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
Keep compiled RuleBasedBreakIterator rules alive for the iterator
diff --cc ext/intl/breakiterator/rulebasedbreakiterator_methods.cpp
index a7c322b1d81,75a52b6047d..2d17e93e46d
--- a/ext/intl/breakiterator/rulebasedbreakiterator_methods.cpp
+++ b/ext/intl/breakiterator/rulebasedbreakiterator_methods.cpp
@@@ -86,7 -93,22 +86,10 @@@ U_CFUNC PHP_METHOD(IntlRuleBasedBreakIt
}
}
- breakiterator_object_create(return_value, rbbi, 0);
+ breakiterator_object_create(object, rbbi, false);
+ if (compiled) {
- Z_INTL_BREAKITERATOR_P(return_value)->compiled_rules = zend_string_copy(rules);
- }
-}
-
-U_CFUNC PHP_METHOD(IntlRuleBasedBreakIterator, __construct)
-{
- zend_error_handling error_handling;
- bool error_handling_replaced = 0;
-
- return_value = ZEND_THIS;
- _php_intlrbbi_constructor_body(INTERNAL_FUNCTION_PARAM_PASSTHRU, &error_handling, &error_handling_replaced);
- if (error_handling_replaced) {
- zend_restore_error_handling(&error_handling);
++ Z_INTL_BREAKITERATOR_P(object)->compiled_rules = zend_string_copy(rules);
+ }
}
U_CFUNC PHP_METHOD(IntlRuleBasedBreakIterator, getRules)