]> granicus.if.org Git - php/commitdiff
- Readd config_get_has(). No need to document, it is only available for debug builds.
authorJani Taskinen <jani@php.net>
Tue, 15 Apr 2008 08:43:48 +0000 (08:43 +0000)
committerJani Taskinen <jani@php.net>
Tue, 15 Apr 2008 08:43:48 +0000 (08:43 +0000)
ext/standard/basic_functions.c
ext/standard/basic_functions.h

index fd48b0f87a2641406079039ed00a675a1350a16d..fc278fe7e3cc68192a4a472ffc58eaf68edff45c 100644 (file)
@@ -956,6 +956,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)
@@ -6421,6 +6427,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;
index f8ecc3576c6def890f27333c2f0668e7b7777434..24501f66621c8b558935e456c68d4386fe783bf6 100644 (file)
@@ -127,7 +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);