If you have shell access, check out your $PATH. Mine was picking up an old version of php.
whereis php echo $PATH
I found the right version of php here: /opt/php71/bin
so I add this line to the end of my .bashrc
Now composer doesn't error. and php artisan runs great!