Ignore:
Timestamp:
12/18/12 16:15:29 (11 years ago)
Author:
douglasz
Message:

Ticket #3236 - Correcoes para Performance: Function Within Loop Declaration.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/phpgwapi/inc/csstidy/class.csstidy_optimise.php

    r7655 r7673  
    302302            $color_tmp = substr($color,4,strlen($color)-5); 
    303303            $color_tmp = explode(',',$color_tmp); 
    304             for ( $i = 0; $i < count($color_tmp); ++$i ) 
     304            $color_tmp_count = count($color_tmp); 
     305            for ( $i = 0; $i < $color_tmp_count; ++$i ) 
    305306            { 
    306307                $color_tmp[$i] = trim ($color_tmp[$i]); 
     
    383384            $temp = array($subvalue); 
    384385        } 
    385         for ($l = 0; $l < count($temp);++$l) 
     386        $temp_count = count($temp); 
     387        for ($l = 0; $l < $temp_count;++$l) 
    386388        { 
    387389            // continue if no numeric value 
     
    665667 
    666668        $str_value = csstidy_optimise::explode_ws(',',$str_value); 
    667         for($i = 0; $i < count($str_value); ++$i) 
     669        $str_value_count = count($str_value); 
     670        for($i = 0; $i < $str_value_count; ++$i) 
    668671        { 
    669672            $have['clip'] = FALSE; $have['pos'] = FALSE; 
     
    672675            $str_value[$i] = csstidy_optimise::explode_ws(' ',trim($str_value[$i])); 
    673676 
    674             for($j = 0; $j < count($str_value[$i]); ++$j) 
     677            $str_value_count = count($str_value[$i]); 
     678            for($j = 0; $j < $str_value_count; ++$j) 
    675679            { 
    676680                if($have['bg'] === FALSE && (substr($str_value[$i][$j],0,4) == 'url(' || $str_value[$i][$j] === 'none')) 
Note: See TracChangeset for help on using the changeset viewer.