php-internal-docs 8.4.8
Unofficial docs for php/php-src
Loading...
Searching...
No Matches
php_pcre.h File Reference
#include "pcre2.h"
#include <locale.h>
#include "php_version.h"

Go to the source code of this file.

Macros

#define pcre_module_ptr   &pcre_module_entry
 
#define PHP_PCRE_VERSION   PHP_VERSION
 
#define PCRE_G(v)
 
#define phpext_pcre_ptr   pcre_module_ptr
 

Typedefs

typedef struct _pcre_cache_entry pcre_cache_entry
 

Enumerations

enum  php_pcre_error_code {
  PHP_PCRE_NO_ERROR = 0 , PHP_PCRE_INTERNAL_ERROR , PHP_PCRE_BACKTRACK_LIMIT_ERROR , PHP_PCRE_RECURSION_LIMIT_ERROR ,
  PHP_PCRE_BAD_UTF8_ERROR , PHP_PCRE_BAD_UTF8_OFFSET_ERROR , PHP_PCRE_JIT_STACKLIMIT_ERROR
}
 

Functions

PHPAPI zend_stringphp_pcre_replace (zend_string *regex, zend_string *subject_str, const char *subject, size_t subject_len, zend_string *replace_str, size_t limit, size_t *replace_count)
 
PHPAPI pcre2_codepcre_get_compiled_regex (zend_string *regex, uint32_t *capture_count)
 
PHPAPI pcre_cache_entrypcre_get_compiled_regex_cache (zend_string *regex)
 
PHPAPI pcre_cache_entrypcre_get_compiled_regex_cache_ex (zend_string *regex, bool locale_aware)
 
PHPAPI void php_pcre_match_impl (pcre_cache_entry *pce, zend_string *subject_str, zval *return_value, zval *subpats, bool global, zend_long flags, zend_off_t start_offset)
 
PHPAPI zend_stringphp_pcre_replace_impl (pcre_cache_entry *pce, zend_string *subject_str, const char *subject, size_t subject_len, zend_string *replace_str, size_t limit, size_t *replace_count)
 
PHPAPI void php_pcre_split_impl (pcre_cache_entry *pce, zend_string *subject_str, zval *return_value, zend_long limit_val, zend_long flags)
 
PHPAPI void php_pcre_grep_impl (pcre_cache_entry *pce, zval *input, zval *return_value, zend_long flags)
 
PHPAPI pcre2_match_contextphp_pcre_mctx (void)
 
PHPAPI pcre2_general_contextphp_pcre_gctx (void)
 
PHPAPI pcre2_compile_contextphp_pcre_cctx (void)
 
PHPAPI void php_pcre_pce_incref (pcre_cache_entry *)
 
PHPAPI void php_pcre_pce_decref (pcre_cache_entry *)
 
PHPAPI pcre2_codephp_pcre_pce_re (pcre_cache_entry *)
 
PHPAPI pcre2_match_dataphp_pcre_create_match_data (uint32_t, pcre2_code *)
 
PHPAPI void php_pcre_free_match_data (pcre2_match_data *)
 

Variables

zend_module_entry pcre_module_entry
 
HashTable pcre_cache
 
zend_long backtrack_limit
 
zend_long recursion_limit
 
php_pcre_error_code error_code
 
zval unmatched_null_pair
 
zval unmatched_empty_pair
 
pcre2_general_contextgctx_zmm
 

Macro Definition Documentation

◆ PCRE_G

#define PCRE_G ( v)
Value:
uint32_t v
Definition cdf.c:1237
#define ZEND_MODULE_GLOBALS_ACCESSOR(module_name, v)
Definition zend_API.h:274

◆ pcre_module_ptr

#define pcre_module_ptr   &pcre_module_entry

Definition at line 32 of file php_pcre.h.

◆ PHP_PCRE_VERSION

#define PHP_PCRE_VERSION   PHP_VERSION

Definition at line 35 of file php_pcre.h.

◆ phpext_pcre_ptr

#define phpext_pcre_ptr   pcre_module_ptr

Typedef Documentation

◆ pcre_cache_entry

Definition at line 37 of file php_pcre.h.

Enumeration Type Documentation

◆ php_pcre_error_code

Enumerator
PHP_PCRE_NO_ERROR 
PHP_PCRE_INTERNAL_ERROR 
PHP_PCRE_BACKTRACK_LIMIT_ERROR 
PHP_PCRE_RECURSION_LIMIT_ERROR 
PHP_PCRE_BAD_UTF8_ERROR 
PHP_PCRE_BAD_UTF8_OFFSET_ERROR 
PHP_PCRE_JIT_STACKLIMIT_ERROR 

Definition at line 39 of file php_pcre.h.

Function Documentation

◆ pcre_get_compiled_regex()

PHPAPI pcre2_code * pcre_get_compiled_regex ( zend_string * regex,
uint32_t * capture_count )

Definition at line 892 of file php_pcre.c.

◆ pcre_get_compiled_regex_cache()

PHPAPI pcre_cache_entry * pcre_get_compiled_regex_cache ( zend_string * regex)

Definition at line 885 of file php_pcre.c.

◆ pcre_get_compiled_regex_cache_ex()

PHPAPI pcre_cache_entry * pcre_get_compiled_regex_cache_ex ( zend_string * regex,
bool locale_aware )

Definition at line 585 of file php_pcre.c.

◆ php_pcre_cctx()

PHPAPI pcre2_compile_context * php_pcre_cctx ( void )

Definition at line 3064 of file php_pcre.c.

◆ php_pcre_create_match_data()

PHPAPI pcre2_match_data * php_pcre_create_match_data ( uint32_t capture_count,
pcre2_code * re )

Definition at line 906 of file php_pcre.c.

◆ php_pcre_free_match_data()

PHPAPI void php_pcre_free_match_data ( pcre2_match_data * match_data)

Definition at line 928 of file php_pcre.c.

◆ php_pcre_gctx()

PHPAPI pcre2_general_context * php_pcre_gctx ( void )

Definition at line 3059 of file php_pcre.c.

◆ php_pcre_grep_impl()

PHPAPI void php_pcre_grep_impl ( pcre_cache_entry * pce,
zval * input,
zval * return_value,
zend_long flags )

Definition at line 2921 of file php_pcre.c.

◆ php_pcre_match_impl()

PHPAPI void php_pcre_match_impl ( pcre_cache_entry * pce,
zend_string * subject_str,
zval * return_value,
zval * subpats,
bool global,
zend_long flags,
zend_off_t start_offset )

Definition at line 1156 of file php_pcre.c.

◆ php_pcre_mctx()

PHPAPI pcre2_match_context * php_pcre_mctx ( void )

Definition at line 3054 of file php_pcre.c.

◆ php_pcre_pce_decref()

PHPAPI void php_pcre_pce_decref ( pcre_cache_entry * pce)

Definition at line 3075 of file php_pcre.c.

◆ php_pcre_pce_incref()

PHPAPI void php_pcre_pce_incref ( pcre_cache_entry * pce)

Definition at line 3069 of file php_pcre.c.

◆ php_pcre_pce_re()

PHPAPI pcre2_code * php_pcre_pce_re ( pcre_cache_entry * pce)

Definition at line 3082 of file php_pcre.c.

◆ php_pcre_replace()

PHPAPI zend_string * php_pcre_replace ( zend_string * regex,
zend_string * subject_str,
const char * subject,
size_t subject_len,
zend_string * replace_str,
size_t limit,
size_t * replace_count )

Definition at line 1586 of file php_pcre.c.

◆ php_pcre_replace_impl()

PHPAPI zend_string * php_pcre_replace_impl ( pcre_cache_entry * pce,
zend_string * subject_str,
const char * subject,
size_t subject_len,
zend_string * replace_str,
size_t limit,
size_t * replace_count )

Definition at line 1614 of file php_pcre.c.

◆ php_pcre_split_impl()

PHPAPI void php_pcre_split_impl ( pcre_cache_entry * pce,
zend_string * subject_str,
zval * return_value,
zend_long limit_val,
zend_long flags )

Definition at line 2564 of file php_pcre.c.

Variable Documentation

◆ backtrack_limit

zend_long backtrack_limit

Definition at line 76 of file php_pcre.h.

◆ error_code

php_pcre_error_code error_code

Definition at line 81 of file php_pcre.h.

◆ gctx_zmm

Definition at line 86 of file php_pcre.h.

◆ pcre_cache

HashTable pcre_cache

Definition at line 75 of file php_pcre.h.

◆ pcre_module_entry

zend_module_entry pcre_module_entry
extern

Definition at line 3031 of file php_pcre.c.

◆ recursion_limit

zend_long recursion_limit

Definition at line 77 of file php_pcre.h.

◆ unmatched_empty_pair

zval unmatched_empty_pair

Definition at line 84 of file php_pcre.h.

◆ unmatched_null_pair

zval unmatched_null_pair

Definition at line 83 of file php_pcre.h.