2 +----------------------------------------------------------------------+
4 +----------------------------------------------------------------------+
5 | Copyright (c) 1997-2013 The PHP Group |
6 +----------------------------------------------------------------------+
7 | This source file is subject to version 3.01 of the PHP license, |
8 | that is bundled with this package in the file LICENSE, and is |
9 | available through the world-wide-web at the following url: |
10 | http://www.php.net/license/3_01.txt |
11 | If you did not receive a copy of the PHP license and are unable to |
12 | obtain it through the world-wide-web, please send a note to |
13 | license@php.net so we can mail you a copy immediately. |
14 +----------------------------------------------------------------------+
15 | Author: Andrei Zmievski <andrei@php.net> |
16 +----------------------------------------------------------------------+
24 #if HAVE_PCRE || HAVE_BUNDLED_PCRE
27 #include "pcrelib/pcre.h"
36 PHPAPI
char *php_pcre_replace(char *regex
, int regex_len
, char *subject
, int subject_len
, zval
*replace_val
, int is_callable_replace
, int *result_len
, int limit
, int *replace_count TSRMLS_DC
);
37 PHPAPI pcre
* pcre_get_compiled_regex(char *regex
, pcre_extra
**extra
, int *options TSRMLS_DC
);
38 PHPAPI pcre
* pcre_get_compiled_regex_ex(char *regex
, pcre_extra
**extra
, int *preg_options
, int *coptions TSRMLS_DC
);
40 extern zend_module_entry pcre_module_entry
;
41 #define pcre_module_ptr &pcre_module_entry
49 unsigned const char *tables
;
55 PHPAPI pcre_cache_entry
* pcre_get_compiled_regex_cache(char *regex
, int regex_len TSRMLS_DC
);
57 PHPAPI
void php_pcre_match_impl( pcre_cache_entry
*pce
, char *subject
, int subject_len
, zval
*return_value
,
58 zval
*subpats
, int global
, int use_flags
, long flags
, long start_offset TSRMLS_DC
);
60 PHPAPI
char *php_pcre_replace_impl(pcre_cache_entry
*pce
, char *subject
, int subject_len
, zval
*return_value
,
61 int is_callable_replace
, int *result_len
, int limit
, int *replace_count TSRMLS_DC
);
63 PHPAPI
void php_pcre_split_impl( pcre_cache_entry
*pce
, char *subject
, int subject_len
, zval
*return_value
,
64 long limit_val
, long flags TSRMLS_DC
);
66 PHPAPI
void php_pcre_grep_impl( pcre_cache_entry
*pce
, zval
*input
, zval
*return_value
,
67 long flags TSRMLS_DC
);
69 ZEND_BEGIN_MODULE_GLOBALS(pcre
)
74 ZEND_END_MODULE_GLOBALS(pcre
)
77 # define PCRE_G(v) TSRMG(pcre_globals_id, zend_pcre_globals *, v)
79 # define PCRE_G(v) (pcre_globals.v)
84 #define pcre_module_ptr NULL
86 #endif /* HAVE_PCRE || HAVE_BUNDLED_PCRE */
88 #define phpext_pcre_ptr pcre_module_ptr
90 #endif /* PHP_PCRE_H */