diff options
author | Anatol Belski <ab@php.net> | 2015-02-07 11:04:53 +0100 |
---|---|---|
committer | Anatol Belski <ab@php.net> | 2015-02-07 11:04:53 +0100 |
commit | be718e45b0aa6a81e1c6f37b7bbdc30820f3c72b (patch) | |
tree | 5f7e7f987c60f8196595fd4013f3dbe034f5ac87 /ext/pcre/php_pcre.c | |
parent | 594c220dea0a1f3bd5e5d7fa72f8e5d00d0d2e6a (diff) | |
download | php-git-be718e45b0aa6a81e1c6f37b7bbdc30820f3c72b.tar.gz |
added PCRE JIT availability info to phpinfo()
and a test to ensure it's enabled
Diffstat (limited to 'ext/pcre/php_pcre.c')
-rw-r--r-- | ext/pcre/php_pcre.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c index baf9941764..c255fd9174 100644 --- a/ext/pcre/php_pcre.c +++ b/ext/pcre/php_pcre.c @@ -132,9 +132,18 @@ PHP_INI_END() /* {{{ PHP_MINFO_FUNCTION(pcre) */ static PHP_MINFO_FUNCTION(pcre) { + int jit_yes = 0; + php_info_print_table_start(); php_info_print_table_row(2, "PCRE (Perl Compatible Regular Expressions) Support", "enabled" ); php_info_print_table_row(2, "PCRE Library Version", pcre_version() ); + + if (!pcre_config(PCRE_CONFIG_JIT, &jit_yes)) { + php_info_print_table_row(2, "PCRE JIT Support", jit_yes ? "enabled" : "disabled"); + } else { + php_info_print_table_row(2, "PCRE JIT Support", "unknown" ); + } + php_info_print_table_end(); DISPLAY_INI_ENTRIES(); |