How to know the version of PHP that was installed with Linux

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
hillxy
Forum Newbie
Posts: 7
Joined: Wed Apr 07, 2004 2:28 pm

How to know the version of PHP that was installed with Linux

Post by hillxy »

as title,
Iam thinking of upgrade it, but as least I need to know its version.
thanks,
User avatar
patrikG
DevNet Master
Posts: 4235
Joined: Thu Aug 15, 2002 5:53 am
Location: Sussex, UK

Post by patrikG »

[php_man]phpinfo[/php_man]

Reading the manual: priceless ;)
lostboy
Forum Contributor
Posts: 329
Joined: Mon Dec 30, 2002 8:12 pm
Location: toronto,canada

Post by lostboy »

Code: Select all

<?php
phpinfo();
?>
hillxy
Forum Newbie
Posts: 7
Joined: Wed Apr 07, 2004 2:28 pm

Post by hillxy »

Thank you!
User avatar
werlop
Forum Commoner
Posts: 68
Joined: Sat Mar 22, 2003 2:50 am
Location: /dev/null

Post by werlop »

Or

Code: Select all

<?php

echo PHP_VERSION;


?>
It's one of the predefined constants:

http://www.php.net/manual/en/reserved.c ... s.core.php
Post Reply