cvs: php4 /ext/standard info.c
| From: | Sascha Schumann | Date: | Mon, 04 Mar 2002 17:48:21 +0000 |
| Subject: | cvs: php4 /ext/standard info.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-9641@lists.php.net to get a copy of this message | ||
sas Mon Mar 4 12:48:21 2002 EDT
Modified files:
/php4/ext/standard info.c
Log:
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).
Index: php4/ext/standard/info.c
diff -u php4/ext/standard/info.c:1.163 php4/ext/standard/info.c:1.164
--- php4/ext/standard/info.c:1.163 Thu Feb 28 03:26:45 2002
+++ php4/ext/standard/info.c Mon Mar 4 12:48:20 2002
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: info.c,v 1.163 2002/02/28 08:26:45 sebastian Exp $ */
+/* $Id: info.c,v 1.164 2002/03/04 17:48:20 sas Exp $ */
#include "php.h"
#include "php_ini.h"
@@ -74,7 +74,7 @@
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 @@
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(" </td></tr>\n");
zend_hash_move_forward(Z_ARRVAL_PP(data));
@@ -226,7 +226,7 @@
PUTS("?="ZEND_LOGO_GUID"\" border=\"0\" align=\"right\"
alt=\"Zend logo\"></a>\n");
}
php_printf("This program makes use of the Zend Scripting Language Engine:<br
/>");
- 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 @@
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</td>", (i==0?"</b>":""));