From: Tim Starling Date: Thu, 28 Sep 2006 09:06:55 +0000 (+0000) Subject: improved debug output X-Git-Tag: 1.31.0-rc.0~55700 X-Git-Url: http://git.heureux-cyclage.org/?a=commitdiff_plain;h=11615aad15a2e11e31e8f78941b3601a30b5336e;p=lhc%2Fweb%2Fwiklou.git improved debug output --- 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 ) {