src/GenSynth.php
public static function highlight_string($source, $language, $return = false, $opts = 0)
    {
        if (is_int($return)) {
            $opts = $return;
            $return = false;
        }

        $gs = new static($source, $language, $opts);
        $s = $gs->parseCode();

        if ($gs->error()) {
            return false;
        }

        if ($return) {
            return '<code>' . $s . '</code>';
        }
        echo '<code>' . $s . '</code>';

        return true;
    }
public static function highlight_string($source, $language, $return = false, $opts = 0)
    {
        if (is_int($return)) {
            $opts = $return;
            $return = false;
        }

        $gs = new static($source, $language, $opts);
        $s = $gs->parseCode();

        if ($gs->error()) {
            return false;
        }

        if ($return) {
            return '<code>' . $s . '</code>';
        }
        echo '<code>' . $s . '</code>';

        return true;
    }
public static function highlight_string ( $ source , $ language , $ return = false , $ opts = 0 ) { if ( is_int ( $ return ) ) { $ opts = $ return ; $ return = false ; } $ gs = new static ( $ source , $ language , $ opts ) ; $ s = $ gs -> parseCode ( ) ; if ( $ gs -> error ( ) ) { return false ; } if ( $ return ) { return '<code>' . $ s . '</code>' ; } echo '<code>' . $ s . '</code>' ; return true ; }
Easy way to highlight stuff. Behaves just like highlight_string

@param  string $source
@param  string $language
@param  bool   $return [Default: false] *Can be skipped*
@param  int    $opts   [Default: 0]

@return bool|string
Easy way to highlight stuff . Behaves just like highlight_string