PHP Parse error on WP-CLI, not on web server

As noted in https://github.com/wp-cli/wp-cli/issues/1754#issuecomment-91361340, I figured this one out. It turns out it wasn’t wp-cli’s fault at all.

My confusion arose from the fact that I’m running a web server with nginx and php fpm, which has it’s own php.ini . wp commands run php (cli) directly on the host and so the config can be different. In this case my php cli didn’t allow short_open_tag (

Solution

Just enabled

short_open_tag=On

in /etc/php5/cli/php.ini
p.s. this is an aws ubuntu box