From 11615aad15a2e11e31e8f78941b3601a30b5336e Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Thu, 28 Sep 2006 09:06:55 +0000 Subject: [PATCH] improved debug output --- maintenance/dumpHTML.php | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/maintenance/dumpHTML.php b/maintenance/dumpHTML.php index 09be15da24..bb1f285a24 100644 --- a/maintenance/dumpHTML.php +++ b/maintenance/dumpHTML.php @@ -116,7 +116,19 @@ if ( $options['special'] ) { } if ( isset( $options['debug'] ) ) { - print_r($GLOBALS); + #print_r($GLOBALS); + # Workaround for bug #36957 + $globals = array_keys( $GLOBALS ); + #sort( $globals ); + $sizes = array(); + foreach ( $globals as $name ) { + $sizes[$name] = strlen( serialize( $GLOBALS[$name] ) ); + } + arsort($sizes); + $sizes = array_slice( $sizes, 0, 20 ); + foreach ( $sizes as $name => $size ) { + printf( "%9d %s\n", $size, $name ); + } } if ( $profiling ) { -- 2.20.1