<?php
preg_replace_callback( "/[0-9]*/", array( &$this, '_getPHPNumber' ), $code );

private function _getPHPNumber( $matches ) {
    return ( $this->_getHtmlCode( $matches[0], PHP::$Colors['number'] ) );
}

private function _getHtmlCode( $text, $color ) {
    $rows = array_filter( explode( "\n", $text ), 'is_string' );
    $count = count( $rows );
    $output = '';

    for ( $i = 0; $i < $count; $i++ ) {
        $n = ( $count > 1 ? ( $i != $count - 1 ? "\n" : "" ) : "" );
        $output .= "<span style=\"color:{$color};\">{$rows[$i]}</span>{$n}";

    }

    return ( $output );
}
?>