r16688 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r16687‎ | r16688 | r16689 >
Date:09:06, 28 September 2006
Author:tstarling
Status:old
Tags:
Comment:
improved debug output
Modified paths:
  • /trunk/phase3/maintenance/dumpHTML.php (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/dumpHTML.php
@@ -116,7 +116,19 @@
117117 }
118118
119119 if ( isset( $options['debug'] ) ) {
120 - print_r($GLOBALS);
 120+ #print_r($GLOBALS);
 121+ # Workaround for bug #36957
 122+ $globals = array_keys( $GLOBALS );
 123+ #sort( $globals );
 124+ $sizes = array();
 125+ foreach ( $globals as $name ) {
 126+ $sizes[$name] = strlen( serialize( $GLOBALS[$name] ) );
 127+ }
 128+ arsort($sizes);
 129+ $sizes = array_slice( $sizes, 0, 20 );
 130+ foreach ( $sizes as $name => $size ) {
 131+ printf( "%9d %s\n", $size, $name );
 132+ }
121133 }
122134
123135 if ( $profiling ) {