Resolve “Parse error: syntax error, unexpected T_OBJECT_OPERATOR, expecting …” error
Parse error: syntax error, unexpected T_OBJECT_OPERATOR, expecting ',' or ';' in /directory/wp-content/themes/123/header.php on line 150
If you are encountering the above error in PHP script, it could be related to the compatibility issue between your version of PHP and the code in your script. Try the following solution.

smallwei 9:15 pm on December 10, 2009
See if you can install php5 if you have control on your server or computer. If you are on shared web hosting, you can normally try adding this line to .htaccess file
AddHandler php5-script .php