rendered paste body<?phpfunction strToPhp ($string){ $phpString = str_replace(chr(13), '_NEW_LINE_', $string[1]); $phpString = str_replace("<br />", '', $phpString); $phpString = highlight_string($phpString, TRUE); $newString = explode("_NEW_LINE_", $phpString); $noLines = count($newString); $noLines--; $returnSession = ''; $returnSession .= "<div id=\"php\">\n"; $returnSession .= "<p>PHP:</p>\n"; $c=1; while(isset($newString[$c])){ if($c != $noLines){ $returnSession .= '<div id="no">'.$c.'</div>'; $line = $newString[$c]; $replace = array( '@<code>@is', '@<br />@is', '@</code>@is'); $by = array( '', '', ''); $line = preg_replace($replace, $by, $line); $returnSession .= $line.'<br>'."\n"; } $c++; } $returnSession .= "</span></div>\n"; return $returnSession; }function phpBB ($string){ $string = preg_replace_callback('/\[php\](.*?)\[\/php\]/is', 'strToPhp', $string); return $string;}?>