How to determine which version of PHP you are using

How to determine which version of PHP you are using

Total time: 1 minute 

If you're programming with PHP at some point you will need to know which version you are using.

Posted in these interests:

php
PRIMARY
8 guides

If you're using OSX you can open Terminal by typing:

cmd + space bar

or just going to Applications -> Utilities and clicking on the Terminal icon.

On the command line in Terminal type:

php -v

The -v flag means version. This will show you which version of PHP you are using. For more options to the php command you can type man php.