summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJani Taskinen <jani@php.net>2008-04-15 08:44:21 +0000
committerJani Taskinen <jani@php.net>2008-04-15 08:44:21 +0000
commit85ad3851e9167d68f488e98cee5536e4e2ae20f1 (patch)
treebaddaa75d6c0423686c6ca3550dbbd8cfb83441f
parent944061ba37ee68e093eadd5538e3854c08f71461 (diff)
downloadphp-git-85ad3851e9167d68f488e98cee5536e4e2ae20f1.tar.gz
MFH
-rw-r--r--ext/standard/basic_functions.c19
-rw-r--r--ext/standard/basic_functions.h3
2 files changed, 22 insertions, 0 deletions
diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c
index 6fe7e613f0..26aaae0941 100644
--- a/ext/standard/basic_functions.c
+++ b/ext/standard/basic_functions.c
@@ -958,6 +958,12 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_parse_ini_file, 0, 0, 1)
ZEND_ARG_INFO(0, scanner_mode)
ZEND_END_ARG_INFO()
+#if ZEND_DEBUG
+static
+ZEND_BEGIN_ARG_INFO(arginfo_config_get_hash, 0)
+ZEND_END_ARG_INFO()
+#endif
+
static
ZEND_BEGIN_ARG_INFO_EX(arginfo_import_request_variables, 0, 0, 1)
ZEND_ARG_INFO(0, types)
@@ -6320,6 +6326,19 @@ PHP_FUNCTION(parse_ini_file)
}
/* }}} */
+#if ZEND_DEBUG
+/* This function returns an array of ALL valid ini options with values and
+ * is not the same as ini_get_all() which returns only registered ini options. Only useful for devs to debug php.ini scanner/parser! */
+PHP_FUNCTION(config_get_hash) /* {{{ */
+{
+ HashTable *hash = php_ini_get_configuration_hash();
+
+ array_init(return_value);
+ zend_hash_apply_with_arguments(hash, (apply_func_args_t) add_config_entry_cb, 1, return_value TSRMLS_CC);
+}
+/* }}} */
+#endif
+
static int copy_request_variable(void *pDest, int num_args, va_list args, zend_hash_key *hash_key) /* {{{ */
{
zval *prefix, new_key;
diff --git a/ext/standard/basic_functions.h b/ext/standard/basic_functions.h
index 164393b711..b8768dc0c6 100644
--- a/ext/standard/basic_functions.h
+++ b/ext/standard/basic_functions.h
@@ -127,6 +127,9 @@ PHP_FUNCTION(move_uploaded_file);
/* From the INI parser */
PHP_FUNCTION(parse_ini_file);
+#if ZEND_DEBUG
+PHP_FUNCTION(config_get_hash);
+#endif
PHP_FUNCTION(str_rot13);
PHP_FUNCTION(stream_get_filters);