Determine the PHP version on your server
In this lesson, we are going to learn how to determine the PHP version running on our server using codes.
Just follow these simple steps:
- Open any text editor (notepad, notepad ++, etc.).
- Type the following code or better copy and paste the code on your text editor:
<?php echo phpversion(); ?>
- Save the file as phpversion.php
Note: make sure that the file extension is .php
- Upload the file to your web root. Ex: C:\wamp\www (for wamp users).
- Open your browser and type http://localhost/phpversion.php
Your browser will look like this: (it will display the PHP version that runs on your server)