public function optimize($php)
	{
		$this->reset($php);
		$this->optimizeTokens();

		// Rebuild the source if it has changed
		if ($this->changed)
		{
			$php = $this->serialize();
		}

		// Free the memory taken up by the tokens
		unset($this->tokens);

		return $php;
	}
public function optimize($php)
	{
		$this->reset($php);
		$this->optimizeTokens();

		// Rebuild the source if it has changed
		if ($this->changed)
		{
			$php = $this->serialize();
		}

		// Free the memory taken up by the tokens
		unset($this->tokens);

		return $php;
	}
public function optimize ( $ php ) { $ this -> reset ( $ php ) ; $ this -> optimizeTokens ( ) ; // Rebuild the source if it has changed if ( $ this -> changed ) { $ php = $ this -> serialize ( ) ; } // Free the memory taken up by the tokens unset ( $ this -> tokens ) ; return $ php ; }
Optimize the control structures of a script

Removes brackets in control structures wherever possible. Prevents the generation of EXT_STMT
opcodes where they're not strictly required.

@param  string $php Original code
@return string      Optimized code
Optimize the control structures of a script