Knowledge for the World
How to determine which version of PHP you are using

How to determine which version of PHP you are using

  • by arthur (2)
  • Time to complete: 1 minute

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

1

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.

2

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.