Home | About | Categories | All Tips & Tutorials

What version of .php are my hosts running

ID: 223

Category: PHP7

Added: 3rd of December 2020

Views: 1,732

If you want to check what version of PHP your host is running on their servers, you can use the phpinfo() function. Some webhosts block this for security reasons.

If this doesn't work you can use the phpversion() function in your .php scripts.

Please look at the code examples below.

<?php
// Show phpinfo file
phpinfo();
?>


<?php
// Print PHP Version
echo "PHP Version: " . phpversion();
?>