Question
Why is the PHP version at the command line different from the system PHP version?
Answer
The PHP version at the command line depends on the current working directory. The PHP version in a site's web folders is the site's PHP version, not the system PHP version. A user's default PHP version can also be set in the user's .bashrc file by setting the path to a specific PHP version in the PATH variable.