The [code] tag currently only highlights PHP code if it begins with "<?php", could it be changed to allow "<?" also?
you can use the
[php] [/php]
bbcode
echo 'bla';
^^as an example
Hmmm... Try this
Sources/Subs.php
1.0.x:
Find
$php_parts = preg_split('~(<\?php|\?>)~', $parts[$i], -1, PREG_SPLIT_DELIM_CAPTURE);
Replace
$php_parts = preg_split('~((<\?php|<\?)|\?>)~', $parts[$i], -1, PREG_SPLIT_DELIM_CAPTURE);
Find
// Do PHP code coloring?
if ($php_parts[$php_i] != '<?php')
Replace
// Do PHP code coloring?
if ($php_parts[$php_i] != '<?php' && $php_parts[$php_i] != '<?')
1.1:
Find
$php_parts = preg_split(\'~(<\?php|\?>)~\', $data, -1, PREG_SPLIT_DELIM_CAPTURE);
Replace
$php_parts = preg_split(\'~((<\?php|<\?)|\?>)~\', $data, -1, PREG_SPLIT_DELIM_CAPTURE);
Find (twice)
// Do PHP code coloring?
if ($php_parts[$php_i] != \'<?php\')
Replace (twice)
// Do PHP code coloring?
if ($php_parts[$php_i] != \'<?php\' && $php_parts[$php_i] != \'<?\')