PHP - php --version command line tool
by
Jeremy Canfield |
Updated: February 23 2021
| PHP articles
On a Linux system, the which command can be used to determine where the php command line tool is located. In this example, the php command line tool is located at /usr/bin/php.
~]# which php
/usr/bin/php
The -v or --version option can be used to display the current version of PHP.
~]# php --version
PHP 7.2.0 (cli) (built: Mar 2 2018 14:47:20) ( ZTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2017 Zend Technologies
Did you find this article helpful?
If so, consider buying me a coffee over at