diff -ur php-5.3.29.orig/ext/mbstring/php_mbregex.c php-5.3.29/ext/mbstring/php_mbregex.c
--- php-5.3.29.orig/ext/mbstring/php_mbregex.c	2014-08-13 21:22:50.000000000 +0200
+++ php-5.3.29/ext/mbstring/php_mbregex.c	2020-03-12 02:27:56.480181292 +0100
@@ -454,7 +454,7 @@
 	OnigUChar err_str[ONIG_MAX_ERROR_MESSAGE_LEN];
 
 	found = zend_hash_find(&MBREX(ht_rc), (char *)pattern, patlen+1, (void **) &rc);
-	if (found == FAILURE || (*rc)->options != options || (*rc)->enc != enc || (*rc)->syntax != syntax) {
+	if (found == FAILURE || onig_get_options(*rc) != options || onig_get_encoding(*rc) != enc || onig_get_syntax(*rc) != syntax) {
 		if ((err_code = onig_new(&retval, (OnigUChar *)pattern, (OnigUChar *)(pattern + patlen), options, enc, syntax, &err_info)) != ONIG_NORMAL) {
 			onig_error_code_to_str(err_str, err_code, err_info);
 			php_error_docref(NULL TSRMLS_CC, E_WARNING, "mbregex compile err: %s", err_str);
