protected static function _highlight($str)
    {
        if (function_exists('hphp_log') || function_exists('hphp_gettid')) {
            return htmlentities($str);
        }
        $added = false;
        if (strpos($str, '<?php') === false) {
            $added = true;
            $str = "<?php \n" . $str;
        }
        $highlight = highlight_string($str, true);
        if ($added) {
            $highlight = str_replace(
                ['&lt;?php&nbsp;<br/>', '&lt;?php&nbsp;<br />'],
                '',
                $highlight
            );
        }

        return $highlight;
    }
protected static function _highlight($str)
    {
        if (function_exists('hphp_log') || function_exists('hphp_gettid')) {
            return htmlentities($str);
        }
        $added = false;
        if (strpos($str, '<?php') === false) {
            $added = true;
            $str = "<?php \n" . $str;
        }
        $highlight = highlight_string($str, true);
        if ($added) {
            $highlight = str_replace(
                ['&lt;?php&nbsp;<br/>', '&lt;?php&nbsp;<br />'],
                '',
                $highlight
            );
        }

        return $highlight;
    }
protected static function _highlight ( $ str ) { if ( function_exists ( 'hphp_log' ) || function_exists ( 'hphp_gettid' ) ) { return htmlentities ( $ str ) ; } $ added = false ; if ( strpos ( $ str , '<?php' ) === false ) { $ added = true ; $ str = "<?php \n" . $ str ; } $ highlight = highlight_string ( $ str , true ) ; if ( $ added ) { $ highlight = str_replace ( [ '&lt;?php&nbsp;<br/>' , '&lt;?php&nbsp;<br />' ] , '' , $ highlight ) ; } return $ highlight ; }
Wraps the highlight_string function in case the server API does not
implement the function as it is the case of the HipHop interpreter

@param string $str The string to convert.
@return string
Wraps the highlight_string function in case the server API does not implement the function as it is the case of the HipHop interpreter