From 42bd356be8185572093f6a178b31aa760ce691ec Mon Sep 17 00:00:00 2001 From: Sascha Schumann Date: Mon, 4 Mar 2002 17:48:20 +0000 Subject: [PATCH] Use PHPWRITE to output data. Because this just outputs diagnostic information, a few spaces won't hurt (and multiple ones are rendered as one by browsers anyway). Micro-benchmarks which use phpinfo() as a mean to generate output will yield more through-put now (35 req/s vs. 83 req/s in tux). --- ext/standard/info.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ext/standard/info.c b/ext/standard/info.c index c5b50ccc9c..2b8df6570a 100644 --- a/ext/standard/info.c +++ b/ext/standard/info.c @@ -74,7 +74,7 @@ static void php_print_gpcse_array(char *name, uint name_length TSRMLS_DC) PUTS("[\""); switch (zend_hash_get_current_key(Z_ARRVAL_PP(data), &string_key, &num_key, 0)) { case HASH_KEY_IS_STRING: - zend_html_puts(string_key, strlen(string_key)); + PHPWRITE(string_key, strlen(string_key)); break; case HASH_KEY_IS_LONG: php_printf("%ld", num_key); @@ -89,10 +89,10 @@ static void php_print_gpcse_array(char *name, uint name_length TSRMLS_DC) tmp2 = **tmp; zval_copy_ctor(&tmp2); convert_to_string(&tmp2); - zend_html_puts(Z_STRVAL(tmp2), Z_STRLEN(tmp2)); + PHPWRITE(Z_STRVAL(tmp2), Z_STRLEN(tmp2)); zval_dtor(&tmp2); } else { - zend_html_puts(Z_STRVAL_PP(tmp), Z_STRLEN_PP(tmp)); + PHPWRITE(Z_STRVAL_PP(tmp), Z_STRLEN_PP(tmp)); } PUTS(" \n"); zend_hash_move_forward(Z_ARRVAL_PP(data)); @@ -226,7 +226,7 @@ PHPAPI void php_print_info(int flag TSRMLS_DC) PUTS("?="ZEND_LOGO_GUID"\" border=\"0\" align=\"right\" alt=\"Zend logo\">\n"); } php_printf("This program makes use of the Zend Scripting Language Engine:
"); - zend_html_puts(zend_version, strlen(zend_version)); + PHPWRITE(zend_version, strlen(zend_version)); php_info_print_box_end(); efree(php_uname); } @@ -417,7 +417,7 @@ PHPAPI void php_info_print_table_row(int num_cols, ...) if (!row_element || !*row_element) { php_printf(" "); } else { - zend_html_puts(row_element, strlen(row_element)); + PHPWRITE(row_element, strlen(row_element)); } php_printf("%s", (i==0?"":"")); -- 2.40.0