Method 1: Use a PHP script to check the PHP version
1. Use phpinfo()
phpinfo is a running command , to display the configuration information of the php server. These include PHP extensions and compiled versions, server information and environment, PHP environment, paths, host and local configuration options, HTTP headers, PHP permissions and more.
<?php echo phpinfo(); ?>
2. Use PHP_VERSION
PHP_VERSION is used to obtain the current PHP version number.
<?php echo PHP_VERSION; ?>
Output:
5.5.12
3. Use phpversion()
phpversion() to get the current PHP version
<?php echo phpversion(); ?>
Output:
5.5.12
Method 2: Check the PHP version through the command line
Use [win r] to open the run window, enter cmd, press Enter, and open the cmd command line
If the environment variables have been configured, enter php -v
directly on the command line, and the version of php will be displayed. information. If you do not configure environment variables, directly enter the PHP installation directory on the command line, and then enter the query command php -v. After entering the query command in the installation directory, you can see the output version information.
Example:
The version information is PHP5.3.29
Method 3: The most direct and simple way to check the PHP version
The above is the detailed content of How to check php version in windows?. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

SecLists
SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

Atom editor mac version download
The most popular open source editor
