How to find out PHP version in Linux SSH

How do I find out the version of PHP running on Linux via SSH?
mpaertAsked:
Who is Participating?
 
xDamoxCommented:
Hi,

In SSH type:

php --version

You should get something similar to:

PHP 5.1.4 (cli) (built: May  8 2006 08:41:41)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies
0
 
RoonaanCommented:
you can run <?php phpinfo(); ?>

-r-
0
 
dr_dedoCommented:
note that for XDamox solution to work, php must be in the system path, or else, you'll have to use php's absolute path /usr/lolcal/.../.../php --version
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.