search
HomeBackend DevelopmentPHP ProblemHow to check php version in windows?

How to check php version in windows?

Nov 21, 2019 pm 02:10 PM
phpwindows

How to check php version in windows?

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

How to check php version in windows?

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

How to check php version in windows?

How to check php version in windows?

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:

How to check php version in windows?

The version information is PHP5.3.29

Method 3: The most direct and simple way to check the PHP version

How to check php version in windows?

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!

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

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

Hot Tools

PhpStorm Mac version

PhpStorm Mac version

The latest (2018.2.1) professional PHP integrated development tool

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

SecLists

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

Atom editor mac version download

The most popular open source editor