Index: trunk/phase3/includes/MagicWord.php |
— | — | @@ -754,7 +754,7 @@ |
755 | 755 | */ |
756 | 756 | function parseMatch( $m ) { |
757 | 757 | reset( $m ); |
758 | | - while ( list( $key, $value ) = each( $m ) ) { |
| 758 | + foreach ( $m as $key => $value ) { |
759 | 759 | if ( $key === 0 || $value === '' ) { |
760 | 760 | continue; |
761 | 761 | } |
Index: trunk/phase3/includes/diff/DairikiDiff.php |
— | — | @@ -371,7 +371,7 @@ |
372 | 372 | } |
373 | 373 | $matches = $ymatches[$line]; |
374 | 374 | reset( $matches ); |
375 | | - while ( list( , $y ) = each( $matches ) ) { |
| 375 | + foreach ( $matches as $y ) { |
376 | 376 | if ( empty( $this->in_seq[$y] ) ) { |
377 | 377 | $k = $this->_lcs_pos( $y ); |
378 | 378 | assert( $k > 0 ); |
— | — | @@ -379,7 +379,7 @@ |
380 | 380 | break; |
381 | 381 | } |
382 | 382 | } |
383 | | - while ( list ( , $y ) = each( $matches ) ) { |
| 383 | + foreach ( $matches as $y ) { |
384 | 384 | if ( $y > $this->seq[$k -1] ) { |
385 | 385 | assert( $y < $this->seq[$k] ); |
386 | 386 | // Optimization: this is a common case: |
— | — | @@ -493,7 +493,7 @@ |
494 | 494 | // Use the partitions to split this problem into subproblems. |
495 | 495 | reset( $seps ); |
496 | 496 | $pt1 = $seps[0]; |
497 | | - while ( $pt2 = next( $seps ) ) { |
| 497 | + foreach ( $seps as $pt2 ) { |
498 | 498 | $this->_compareseq ( $pt1[0], $pt2[0], $pt1[1], $pt2[1] ); |
499 | 499 | $pt1 = $pt2; |
500 | 500 | } |