Category: PHP7

Added: 3rd of December 2020

Viewed: 1,565 times


What version of .php are my hosts running

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();
?>