Index: trunk/phase3/maintenance/dumpHTML.php |
— | — | @@ -116,7 +116,19 @@ |
117 | 117 | } |
118 | 118 | |
119 | 119 | 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 | + } |
121 | 133 | } |
122 | 134 | |
123 | 135 | if ( $profiling ) { |