Here's a demo of rendering the result of highlight.php with line numbers. With the HighlightUtilities\splitCodeIntoArray() function.
HighlightUtilities\splitCodeIntoArray()
= $line; ?>