Voting

: eight minus six?
(Example: nine)

The Note You're Voting On

razvan_bc at yahoo dot com
7 years ago
i notice that on 45=75kb php file compressed using php_strip_whitespace i got slowest speed results in my apache benchmark  .bat tests so doing on a normal php file 10 tests and another 10 tests on a compressed one ,calculating the math average value  I got fastest results on  normal php files.

well,seeing that results i think  SO ,NICE,BUT IF WE COMBINE THESE "METHODS" : what if i use a partial minified method using this function ????

here is the code:
(if you run this in xampp and you are beginner you got a blank page in firefox  ,but if you right click it then you click on the option "view source" you'll get the php partial stripped by comments and tabs) :

<?php
/*   hi there !!!
here are the comments */
//another try

echo removecomments('index.php');

/*   hi there !!!
here are the comments */
//another try
function removecomments($f){
    $w=Array(';','{','}');
    $ts = token_get_all(php_strip_whitespace($f));
    $s='';
    foreach($ts as $t){
        if(is_array($t)){
            $s .=$t[1];
        }else{
            $s .=$t;
            if( in_array($t,$w) ) $s.=chr(13).chr(10);
        }
    }

    return $s;
}

?>

<< Back to user notes page

To Top