Check PHP version

create a php file and copy this codes into the file.

"
phpinfo();
?>
"

5 comments:

Ciprian said...

How to check the php server version without using the phpinfo()?
I think everyone is asking for this in order to make their scripts check the version before running the proper classes.
I've googled a lot... All the answers I found so far where the use of phpinfo. But I did found a site that actually returns that server version value, not telling how thy did it... (http://hscripts.com/tools/HVLT/index.php)
Does anyone know how to do that?

Ciprian said...

I actually found what I really needed:
version_compare(phpversion(),'5.0.0','>=')

All the best!

Rico Troubleshooting said...

that's fast!
Thanks for the tip!! :)

Ciprian said...

Yeah.. I was kinda panicked getting no hints after so many searches. I finally did the right thing: looked up the Php Manual from php.net ;)

Rico Troubleshooting said...

pure hard work pays... i guess... :)