Welcome Guest, Not a member yet? Register   Sign In
JSMin_PHP Library Port
#4

[eluser]louis w[/eluser]
I have been meaning to implement this myself. Saved me some work Smile

Why are you creating a new jsmin object inside itself? Couldn't you just do this?

Code:
public static function minify($js) {

    $this->input       = str_replace("\r\n", "\n", $input);
    $this->inputLength = strlen($this->input);
    
    $return = $this->min();

    // Housekeeping
    $this->input       = null;
    $this->inputLength = null;

    return $return;

  }

(And remove that from the constructor)


Messages In This Thread
JSMin_PHP Library Port - by El Forum - 01-21-2009, 10:56 AM
JSMin_PHP Library Port - by El Forum - 01-21-2009, 10:59 AM
JSMin_PHP Library Port - by El Forum - 01-28-2009, 03:22 PM
JSMin_PHP Library Port - by El Forum - 01-28-2009, 04:05 PM
JSMin_PHP Library Port - by El Forum - 01-28-2009, 06:17 PM
JSMin_PHP Library Port - by El Forum - 01-28-2009, 07:32 PM
JSMin_PHP Library Port - by El Forum - 06-16-2010, 01:39 PM
JSMin_PHP Library Port - by El Forum - 06-17-2010, 07:41 AM
JSMin_PHP Library Port - by El Forum - 08-07-2011, 12:26 PM



Theme © iAndrew 2016 - Forum software by © MyBB