Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[DOC] MFH: add PCRE_VERSION constant to ext/pcre

  • Loading branch information...
commit 3afa134717dcfc2e18efb17967c4210a84fec3c3 1 parent 99a162b
@tony2001 tony2001 authored
Showing with 3 additions and 1 deletion.
  1. +1 −0  NEWS
  2. +2 −1  ext/pcre/php_pcre.c
View
1  NEWS
@@ -34,6 +34,7 @@ PHP NEWS
- Added CURLOPT_PRIVATE & CURLINFO_PRIVATE constants.
(Andrey A. Belashkov, Tony)
- Added missing MSG_EOR and MSG_EOF constants to sockets extension. (Jani)
+- Added PCRE_VERSION constant. (Tony)
- Implemented FR #41884 (ReflectionClass::getDefaultProperties() does not handle
static attributes). (Tony)
View
3  ext/pcre/php_pcre.c
@@ -56,7 +56,7 @@ enum {
};
-ZEND_DECLARE_MODULE_GLOBALS(pcre);
+ZEND_DECLARE_MODULE_GLOBALS(pcre)
static void pcre_handle_exec_error(int pcre_code TSRMLS_DC) /* {{{ */
@@ -149,6 +149,7 @@ static PHP_MINIT_FUNCTION(pcre)
REGISTER_LONG_CONSTANT("PREG_BACKTRACK_LIMIT_ERROR", PHP_PCRE_BACKTRACK_LIMIT_ERROR, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("PREG_RECURSION_LIMIT_ERROR", PHP_PCRE_RECURSION_LIMIT_ERROR, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("PREG_BAD_UTF8_ERROR", PHP_PCRE_BAD_UTF8_ERROR, CONST_CS | CONST_PERSISTENT);
+ REGISTER_STRING_CONSTANT("PCRE_VERSION", (char *)pcre_version(), CONST_CS | CONST_PERSISTENT);
return SUCCESS;
}
Please sign in to comment.
Something went wrong with that request. Please try again.