Oh and while I'm on a roll here's another brainwave. At the moment the PHP BBC tag does not style the same way as the ordinary code tags, nor does it have a selection link above it. We should use consistent formatting there too.
[php] array(
'tag' => 'php',
'type' => 'unparsed_content',
'content' => '<span class="phpcode">$1</span>',
'validate' => isset($disabled['php']) ? null : create_function('&$tag, &$data, $disabled', '
if (!isset($disabled[\'php\']))
{
$add_begin = substr(trim($data), 0, 5) != \'<?\';
$data = highlight_php_code($add_begin ? \'<?php \' . $data . \'?>\' : $data);
if ($add_begin)
$data = preg_replace(array(\'~^(.+?)<\?.{0,40}?php(?: |\s)~\', \'~\?>((?:</(font|span)>)*)$~\'), \'$1\', $data, 2);
}'),
'block_level' => false,
'disabled_content' => '$1',
),[/php]
Testing something.
[php] array(
'tag' => 'php',
'type' => 'unparsed_content',
'content' => '<span class="phpcode">$1</span>',
'validate' => isset($disabled['php']) ? null : create_function('&$tag, &$data, $disabled', '
if (!isset($disabled[\'php\']))
{
$add_begin = substr(trim($data), 0, 5) != \'<?\';
$data = highlight_php_code($add_begin ? \'<?php \' . $data . \'?>\' : $data);
if ($add_begin)
$data = preg_replace(array(\'~^(.+?)<\?.{0,40}?php(?: |\s)~\', \'~\?>((?:</(font|span)>)*)$~\'), \'$1\', $data, 2);
}'),
'block_level' => false,
'disabled_content' => '$1',
),[/php]
ETA: Yup. Putting php tags inside code tags borks the syntax highlighting. Is not optimal innit.