by design the left blocks will parse the php that you've inserted into it because they are loaded from within the header.thtml, which will have its php parsed whereas no other thtml files will. So any php in the right blocks, which are typically loaded from the footer will not be parsed.
you might as well have used a normal block on the left and put your php in the content area--that's basically what you did by returning the php open and close thingies. Try this function instead:
Text Formatted Code