title: How to access a String function with PHP?
body: <p>I am using the PHP CSS preprocessor <a href="http://the-echoplex.net/csscrush" rel="nofollow noreferrer">CssCrush</a> for the first time and I am needing to implement the <a href="http://the-echoplex.net/csscrush/#api--functions" rel="nofollow noreferrer"><code>csscrush_string()</code></a> function into my custom assets manager. Previously I was using <a href="https://code.google.com/p/cssmin/" rel="nofollow noreferrer">CssMin</a> but now I need use of the preprocessor.</p>
  <p>The following snippet below obviously has a syntax error at <code>$data = csscrush_string( string $string [, array $options ] );</code> and I do not know how to correct it.</p>
  <p>I have also tried: <code>$data = Crush::csscrush_string();</code> but I get <code>PHP Fatal error:  Class 'Crush' not found...</code> even-though <code>Crush</code> is a class.</p>
  <p><strong>Using CssCrush</strong> (replacing CssMin):</p>
  <pre><code>&lt;?php
  
  private function process_resource($file, $type)
  {
       //...Files are combined and dumped into $data up here
      // before running the preprocessor and minifier...
  
      $data = str_replace($keys, $vals, $data);
      $css_lib = VENDOR_DIR . &quot;css-crush/css-crush/CssCrush.php&quot;;
      if ($this-&gt;settings[$type][&quot;minify&quot;])
      {
          require $css_lib;
          $data = csscrush_string( string $string [, array $options ] );
          $data = trim($data);
      }
  }
  </code></pre>
  <p><strong>Using CssMin</strong> (works):</p>
  <pre><code>&lt;?php
  
  $data = str_replace($keys, $vals, $data);
  css_lib = VENDOR_DIR . &quot;natxet/CssMin/src/CssMin.php&quot;;
  if ($this-&gt;settings[$type][&quot;minify&quot;])
  {
      require $css_lib;
      $data = CssMin::minify($data);
      $data = trim($data);
  }
  </code></pre>