Syntax errors when using code/php tags

Is there any way to avoid the syntax errors that occur when using the code/php tags? Example, in this thread, spaces are added in a couple of lines, and I have no idea why (is matrix a keyword of some sort?!?)