Lines Matching refs:PCRE_G
136 PCRE_G(error_code) = preg_code; in pcre_handle_exec_error()
338 pcre2_set_match_limit(mctx, (uint32_t)PCRE_G(backtrack_limit)); in PHP_INI_MH()
348 pcre2_set_depth_limit(mctx, (uint32_t)PCRE_G(recursion_limit)); in PHP_INI_MH()
358 if (PCRE_G(jit) && jit_stack) { in PHP_INI_MH()
437 php_pcre_init_pcre2(PCRE_G(jit)); in PHP_MINIT_FUNCTION()
472 php_pcre_init_pcre2(PCRE_G(jit)); in PHP_RINIT_FUNCTION()
483 PCRE_G(error_code) = PHP_PCRE_NO_ERROR; in PHP_RINIT_FUNCTION()
484 PCRE_G(gctx_zmm) = pcre2_general_context_create(php_pcre_emalloc, php_pcre_efree, NULL); in PHP_RINIT_FUNCTION()
485 if (!PCRE_G(gctx_zmm)) { in PHP_RINIT_FUNCTION()
489 if (PCRE_G(per_request_cache)) { in PHP_RINIT_FUNCTION()
490 zend_hash_init(&PCRE_G(pcre_cache), 0, NULL, php_efree_pcre_cache, 0); in PHP_RINIT_FUNCTION()
499 pcre2_general_context_free(PCRE_G(gctx_zmm)); in PHP_RSHUTDOWN_FUNCTION()
500 PCRE_G(gctx_zmm) = NULL; in PHP_RSHUTDOWN_FUNCTION()
502 if (PCRE_G(per_request_cache)) { in PHP_RSHUTDOWN_FUNCTION()
503 zend_hash_destroy(&PCRE_G(pcre_cache)); in PHP_RSHUTDOWN_FUNCTION()
506 zval_ptr_dtor(&PCRE_G(unmatched_null_pair)); in PHP_RSHUTDOWN_FUNCTION()
507 zval_ptr_dtor(&PCRE_G(unmatched_empty_pair)); in PHP_RSHUTDOWN_FUNCTION()
508 ZVAL_UNDEF(&PCRE_G(unmatched_null_pair)); in PHP_RSHUTDOWN_FUNCTION()
509 ZVAL_UNDEF(&PCRE_G(unmatched_empty_pair)); in PHP_RSHUTDOWN_FUNCTION()
624 zv = zend_hash_find(&PCRE_G(pcre_cache), key); in pcre_get_compiled_regex_cache_ex()
808 if (PCRE_G(jit)) { in pcre_get_compiled_regex_cache_ex()
821 PCRE_G(jit) = 0; in pcre_get_compiled_regex_cache_ex()
836 if (zend_hash_num_elements(&PCRE_G(pcre_cache)) == PCRE_CACHE_SIZE) { in pcre_get_compiled_regex_cache_ex()
838 zend_hash_apply_with_argument(&PCRE_G(pcre_cache), pcre_clean_cache, &num_clean); in pcre_get_compiled_regex_cache_ex()
875 if (!(GC_FLAGS(key) & IS_STR_PERMANENT) && !PCRE_G(per_request_cache)) { in pcre_get_compiled_regex_cache_ex()
879 ret = zend_hash_add_new_mem(&PCRE_G(pcre_cache), str, &new_entry, sizeof(pcre_cache_entry)); in pcre_get_compiled_regex_cache_ex()
882 ret = zend_hash_add_new_mem(&PCRE_G(pcre_cache), key, &new_entry, sizeof(pcre_cache_entry)); in pcre_get_compiled_regex_cache_ex()
950 ZVAL_ARR(&PCRE_G(unmatched_null_pair), zend_new_pair(&val1, &val2)); in init_unmatched_null_pair()
957 ZVAL_ARR(&PCRE_G(unmatched_empty_pair), zend_new_pair(&val1, &val2)); in init_unmatched_empty_pair()
1003 if (Z_ISUNDEF(PCRE_G(unmatched_null_pair))) { in add_offset_pair()
1006 ZVAL_COPY(&match_pair, &PCRE_G(unmatched_null_pair)); in add_offset_pair()
1008 if (Z_ISUNDEF(PCRE_G(unmatched_empty_pair))) { in add_offset_pair()
1011 ZVAL_COPY(&match_pair, &PCRE_G(unmatched_empty_pair)); in add_offset_pair()
1246 PCRE_G(error_code) = PHP_PCRE_NO_ERROR; in php_pcre_match_impl()
1251 match_data = pcre2_match_data_create_from_pattern(pce->re, PCRE_G(gctx_zmm)); in php_pcre_match_impl()
1253 PCRE_G(error_code) = PHP_PCRE_INTERNAL_ERROR; in php_pcre_match_impl()
1455 if (PCRE_G(error_code) == PHP_PCRE_NO_ERROR) { in php_pcre_match_impl()
1617 PCRE_G(error_code) = PHP_PCRE_NO_ERROR; in php_pcre_replace_impl()
1622 match_data = pcre2_match_data_create_from_pattern(pce->re, PCRE_G(gctx_zmm)); in php_pcre_replace_impl()
1624 PCRE_G(error_code) = PHP_PCRE_INTERNAL_ERROR; in php_pcre_replace_impl()
1657 PCRE_G(error_code) = PHP_PCRE_INTERNAL_ERROR; in php_pcre_replace_impl()
1869 PCRE_G(error_code) = PHP_PCRE_NO_ERROR; in php_pcre_replace_func_impl()
1876 match_data = pcre2_match_data_create_from_pattern(pce->re, PCRE_G(gctx_zmm)); in php_pcre_replace_func_impl()
1878 PCRE_G(error_code) = PHP_PCRE_INTERNAL_ERROR; in php_pcre_replace_func_impl()
1913 PCRE_G(error_code) = PHP_PCRE_INTERNAL_ERROR; in php_pcre_replace_func_impl()
2537 PCRE_G(error_code) = PHP_PCRE_NO_ERROR; in php_pcre_split_impl()
2550 match_data = pcre2_match_data_create_from_pattern(pce->re, PCRE_G(gctx_zmm)); in php_pcre_split_impl()
2552 PCRE_G(error_code) = PHP_PCRE_INTERNAL_ERROR; in php_pcre_split_impl()
2582 PCRE_G(error_code) = PHP_PCRE_INTERNAL_ERROR; in php_pcre_split_impl()
2676 if (PCRE_G(error_code) != PHP_PCRE_NO_ERROR) { in php_pcre_split_impl()
2883 PCRE_G(error_code) = PHP_PCRE_NO_ERROR; in php_pcre_grep_impl()
2888 match_data = pcre2_match_data_create_from_pattern(pce->re, PCRE_G(gctx_zmm)); in php_pcre_grep_impl()
2890 PCRE_G(error_code) = PHP_PCRE_INTERNAL_ERROR; in php_pcre_grep_impl()
2958 RETURN_LONG(PCRE_G(error_code)); in PHP_FUNCTION()
2967 RETURN_STRING(php_pcre_get_error_msg(PCRE_G(error_code))); in PHP_FUNCTION()