In my case I had to use the following code:
I am pretty much a php noob and it took me a good hour to figure this out. I guess its because I declared the parser as an object at the beginning of the script. I am using a function that gets the last 10 posts in a forum and displays it as HTML for use on the homepage. As we all SHOULD know, php requires that you declare a variable "global" if its outside your function.