]> granicus.if.org Git - php/commitdiff
MFH
authorJani Taskinen <jani@php.net>
Tue, 15 Apr 2008 08:44:21 +0000 (08:44 +0000)
committerJani Taskinen <jani@php.net>
Tue, 15 Apr 2008 08:44:21 +0000 (08:44 +0000)
ext/standard/basic_functions.c
ext/standard/basic_functions.h

index 6fe7e613f085750f65aac6027d38ab2f833708e5..26aaae094164a45da0213dd3a0aef20489bff86d 100644 (file)
@@ -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;
index 164393b711a858a49332ff17864ae0664c8584ea..b8768dc0c63570998b26693c42795a92af34d82f 100644 (file)
@@ -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);