global
------
- * sort ini entries so that phpinfo() show them in some nice order.
* make everything on the language-level independent of your locale setings.
* allow methods to be called as callbacks. eg: array_walk($myarray,"this->print()");
* always build the standalone executable as well as the chosen SAPI
PUTS("</a>\n");
}
+ php_ini_sort_entries();
if (flag & PHP_INFO_CONFIGURATION) {
php_info_print_hr();
PUTS(append_string);
}
}
+#if ZEND_DEBUG
+ {
+ zend_bool trigger_break;
+
+ switch (type) {
+ case E_ERROR:
+ case E_CORE_ERROR:
+ case E_COMPILE_ERROR:
+ case E_USER_ERROR:
+ trigger_break=1;
+ break;
+ default:
+ trigger_break=0;
+ break;
+ }
+ zend_output_debug_string(trigger_break, "%s(%d) : %s - %s", error_filename, error_lineno, error_type_str, buffer);
+ }
+#endif
}
}
SLS_FETCH();
PLS_FETCH();
+ if (setjmp(EG(bailout))!=0) {
+ return;
+ }
+
sapi_send_headers();
php_end_ob_buffering(SG(request_info).headers_only?0:1);
return SUCCESS;
}
+
+static int ini_key_compare(const void *a, const void *b)
+{
+ Bucket *f;
+ Bucket *s;
+
+ f = *((Bucket **) a);
+ s = *((Bucket **) b);
+
+ if (f->nKeyLength==0 && s->nKeyLength==0) { /* both numeric */
+ return ZEND_NORMALIZE_BOOL(f->nKeyLength - s->nKeyLength);
+ } else if (f->nKeyLength==0) { /* f is numeric, s is not */
+ return -1;
+ } else if (s->nKeyLength==0) { /* s is numeric, f is not */
+ return 1;
+ } else { /* both strings */
+ return zend_binary_strcasecmp(f->arKey, f->nKeyLength, s->arKey, s->nKeyLength);
+ }
+}
+
+
+void php_ini_sort_entries()
+{
+ zend_hash_sort(&known_directives, qsort, ini_key_compare, 0);
+}
+
/*
* Registration / unregistration
*/
int php_ini_mshutdown(void);
int php_ini_rshutdown(void);
+void php_ini_sort_entries();
+
PHPAPI int php_register_ini_entries(php_ini_entry *ini_entry, int module_number);
PHPAPI void php_unregister_ini_entries(int module_number);
PHPAPI void php_ini_refresh_caches(int stage);