How to check PHP version on Windows 10 or 11
Before following this tutorial, please make sure that PHP is properly configured on your Windows system. In addition to this, you will need a command prompt or terminal access.
Check PHP version using Command Prompt or Powershell
The best and easiest way to identify the installed PHP version is to use its command line tool. However, to use it, the user must have access to a Windows command line application such as CMD.
Go to Windows 10 or 11 search box and type CMD or Powershell. You can use any of them. When the icon appears on any of these tools, click it to run it.
Run the given php
command which will help you check the PHP version installed on Windows 10/11 or any other version you are using:
php -v
or
php -version
The above commands are not limited to Windows, but can also be used by users of other operating systems such as Linux or MacOS. When you run the grammar, the version and technical details are returned.
However, if you have more than one installed, this command will only show the default version on your system, not all available versions.
PHP is not recognized as an internal or external command
Sometimes if you run PHP -vand get an error at the Windows prompt or PowerShell PHP is not recognized as an internal or external command , then it is possible that the location where PHP is installed is not added to your system path.
So, first open the C drive and find out the path where PHP is located. By default it will be: C:\Program Files\php\php.exe
However, we use Choco to install it, so our default The path is C:\tools\php
After confirming the location, open the system variables window. To do this, go to the search box and type -Edit System Environment Variables
Click on it as the option is available in the search results.

Soon System Properties will open, here you have to click "Environment Variables... " button.

Select Path from the System Variables area and click the Edit button for more options for use in Windows Add the path to the folder where PHP is installed.

Finally , click the Browse button and navigate to the folder where PHP is located .

Once you find the folder, select it and press the OK button.

Now, open Command Prompt or PowerShell to run php -v
Common commands that display version-related details.
Create a PHP Info() page on Windows
Another way to check the PHP version on Windows 11 or 10 is to use a line of code that will display all the necessary information, Includes extensions and their versions.
For your command prompt or terminal type:
notepad info.php
Paste the following code after that and Save and Close the file .

Now, you may not know that PHP comes with its own web server that we can use to test PHP based applications. So, run:
php -S localhost:8000

created info.php you will see PHP's built-in Web The server will start at your current Windows command prompt. Now, open your browser and type :
http://localhost:8000/info.php
You will see a detailed message about the PHP version you have installed.

The above is the detailed content of How do I know if PHP is installed on Windows?. For more information, please follow other related articles on the PHP Chinese website!

如何在Windows10或11上检查PHP版本在学习本教程之前,请确保已在您的Windows系统上正确配置PHP。除此之外,您还需要一个命令提示符或终端访问权限。使用命令提示符或Powershell检查PHP版本识别已安装的PHP版本的最好和最简单的方法是使用其命令行工具。但是,要使用,用户必须有权访问Windows命令行应用程序,如CMD。转到Windows10或11搜索框并键入CMD或Powershell。您可以使用其中任何一个。当图标出现在这些

Python 已成为最流行的 Web 开发编程语言之一,这要归功于它的简单性、多功能性以及大量的库和框架集合。在使用 Python 构建 Web 应用程序时,开发人员有多种选择,从 Django 和 Pyramid 等全栈框架到 Flask 和 FastAPI 等轻量级微框架,再到用于数据科学应用程序的 Streamlit 等专用工具。在本文中,我们将比较三种最流行的 Python Web 框架——FastAPI、Flask 和 Streamlit——以帮助您为项目选择合适的工具。我们将探讨每个

自从Python编程语言诞生以来,它的核心理念一直是最大限度地提高代码的可读性和简单性。Python对可读性和简单性的追求简直达到了如痴如狂的境地。一个事实即可证实这一点:只要你在Python系统的根目录中输入命令“import this”后按下回车键,竟然马上打印出一首英文小诗,翻译成中文大致意思是:“美丽胜过丑陋,显式优于隐式。简单比复杂好,复杂比繁杂好。扁平优于嵌套,稀疏胜过密集。可读性很重要……”简单总比复杂好,可读性很重要。毫无疑问,Python确实在实现这些目标方面非常成功:它是迄今

使用命令提示符或PowerShell在Windows上安装PHP安装ChocolateyChoco包管理器我尝试了Windows默认包管理器Winget,但无法通过它安装PHP。因此,剩下的另一个最佳选择是使用流行的Chocolatey包管理器。但与Winget不同的是,Choco默认情况下不存在于我们的Windows系统中,因此我们需要在我们的系统上手动安装它。转到您的Windows10或11搜索框并键入CMD,出现时选择“以管理员身份运行”将给定的命令复制

不算。html是一种用来告知浏览器如何组织页面的标记语言,而CSS是一种用来表现HTML或XML等文件样式的样式设计语言;html和css不具备很强的逻辑性和流程控制功能,缺乏灵活性,且html和css不能按照人类的设计对一件工作进行重复的循环,直至得到让人类满意的答案。

在 Windows 10 或 11 上安装 Python 3在这里,我们讨论两种设置 Python 的方法,一种是使用图形安装向导,另一种是借助提示符或 Powershell(终端)中的命令。使用图形用户界面:1.下载Python最新版本众所周知,默认情况下,Windows 中不包含 Python 来编译我们基于它的程序。因此,请访问官方网站python.org ,通过单击“下

Python是最通用的编程语言之一:从研究人员运行他们的测试模型到开发人员在繁重的生产环境中使用它,几乎在每个可能的技术领域都有使用案例。在今天的指南中,我们将了解Brownie,一个基于Python的工具,用于编写和部署智能合约。准备安装Python3以太坊节点文本编辑器终端什么是Brownie?智能合约开发主要由基于JavaScript的库主导,如web3.js、ethers.js、Truffle和Hardhat。Python是一种通用的、高度使用的语言,也可用于智能合约/web3的开

Python 可以说是最容易入门的编程语言,在numpy,scipy等基础包的帮助下,对于数据的处理和机器学习来说Python可以说是目前最好的语言,在各位大佬和热心贡献者的帮助下Python拥有一个庞大的社区支持技术发展,开发两个各种 Python 包来帮助数据人员的工作。在本文中,将介绍一些非常独特的并且好用的 Python 包,它们可以在许多方面帮助你构建数据的工作流。1、KnockknockKnockknock是一个简单的Python包,它会在机器学习模型训练结束或崩溃时通知您。我们可以

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

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

SublimeText3 Linux new version
SublimeText3 Linux latest version

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.

WebStorm Mac version
Useful JavaScript development tools

SublimeText3 English version
Recommended: Win version, supports code prompts!
