lib/Minify/CommentPreserver.php
private static function _nextComment($in)
    {
        if (false === ($start = strpos($in, '/*!')) || false === ($end = strpos($in, '*/', $start + 3))) {
            return array($in, false, false);
        }

        $beforeComment = substr($in, 0, $start);
        $comment = self::$prepend . '/*!' . substr($in, $start + 3, $end - $start - 1) . self::$append;

        $endChars = (strlen($in) - $end - 2);
        $afterComment = (0 === $endChars) ? '' : substr($in, -$endChars);

        return array($beforeComment, $comment, $afterComment);
    }
private static function _nextComment($in)
    {
        if (false === ($start = strpos($in, '/*!')) || false === ($end = strpos($in, '*/', $start + 3))) {
            return array($in, false, false);
        }

        $beforeComment = substr($in, 0, $start);
        $comment = self::$prepend . '/*!' . substr($in, $start + 3, $end - $start - 1) . self::$append;

        $endChars = (strlen($in) - $end - 2);
        $afterComment = (0 === $endChars) ? '' : substr($in, -$endChars);

        return array($beforeComment, $comment, $afterComment);
    }
private static function _nextComment ( $ in ) { if ( false === ( $ start = strpos ( $ in , '/*!' ) ) || false === ( $ end = strpos ( $ in , '*/' , $ start + 3 ) ) ) { return array ( $ in , false , false ) ; } $ beforeComment = substr ( $ in , 0 , $ start ) ; $ comment = self :: $ prepend . '/*!' . substr ( $ in , $ start + 3 , $ end - $ start - 1 ) . self :: $ append ; $ endChars = ( strlen ( $ in ) - $ end - 2 ) ; $ afterComment = ( 0 === $ endChars ) ? '' : substr ( $ in , - $ endChars ) ; return array ( $ beforeComment , $ comment , $ afterComment ) ; }
Extract comments that YUI Compressor preserves.

@param string $in input

@return array 3 elements are returned. If a YUI comment is found, the
2nd element is the comment and the 1st and 3rd are the surrounding
strings. If no comment is found, the entire string is returned as the
1st element and the other two are false.
Extract comments that YUI Compressor preserves .