}
$matches = $ymatches[$line];
reset( $matches );
- foreach ( $matches as $y ) {
+ while ( list( , $y ) = each( $matches ) ) {
if ( empty( $this->in_seq[$y] ) ) {
$k = $this->_lcs_pos( $y );
assert( $k > 0 );
break;
}
}
- foreach ( $matches as $y ) {
+ while ( list ( , $y ) = each( $matches ) ) {
if ( $y > $this->seq[$k -1] ) {
assert( $y < $this->seq[$k] );
// Optimization: this is a common case:
// Use the partitions to split this problem into subproblems.
reset( $seps );
$pt1 = $seps[0];
- foreach ( $seps as $pt2 ) {
+ while ( $pt2 = next( $seps ) ) {
$this->_compareseq ( $pt1[0], $pt2[0], $pt1[1], $pt2[1] );
$pt1 = $pt2;
}