How to check PHP version number
PHP provides several functions that depend upon the version number of PHP you are running. In situations, where you want to find the version number of PHP installed, you can use the following techniques.
Assuming that your web server has already been set up to support PHP, enter the following code in a PHP file e.g. info.php and put it somewhere inside your document root.
<?php phpinfo(); ?>
Now, visit the page from your browser by entering the URL to the page e.g. http://<domain name>/path/to/file/info.php
You’ll see a page with a lot of details about the current PHP setup on your machine. At the very top you should be able to find the version number of your PHP installation.
Assuming that the PHP interpreter is in your path, hence can be accessed by typing php on the command line. You can also run the following command to find PHP’s version number.
C:/>php –v
Please feel free to use the comments form below if you have any questions or need more explanation on anything. Use the icons below to share this tutorial with your friends.
tags cloud
popular searches
free download for mysql database server 5.1.5, php, linux, mysql mysql, mysql, java, install mysql, gearman, ubuntu, tools, source code, bison, mysql initialization, install cairo, laptop
Similar Tutorials:
- Difference between '==' (equal) and '===' (identical) comparison operators in PHP (with examples)
- PHP Useful functions (Part 1) - The inRange function
- How to check MySQL version number
- Generating Unique IDs in PHP
- Simple Coding Style for PHP - Part 2/2
Tutorials in 'Web Development > PHP' (more):
- Generating prime nos in PHP using multiprocessing - Geaman with PHP client Part I
- PHP Useful functions (Part 2) - The currentURL function
- PHP Useful functions (Part 1) - The inRange function
- Generating Unique IDs in PHP
- Installing Symfony using PEAR


Comments (write a comment):
0 comments so far. Be the first one to leave a comment on this article.