public static function indentPhp($code) { $r = \PHPLighter::highlight($code, true, \PHPLighter::NO_LINKIFY_LINKS | \PHPLighter::NO_LINKIFY_EMAILS); $r = nl2br($r); $r = preg_replace('/^(<pre class="pretty-php">)/', '<zz class="pretty-php">', $r); $r = preg_replace('/(<\\/pre>)$/', '</zz>', $r); $r = preg_replace('/[\\r\\n]/', '', $r); return $r; }