-
PHP For Windows
This site is dedicated to supporting PHP on Microsoft Windows.
It also supports ports of PHP extensions or features as well as
providing special builds for the various Windows architectures.If you like to build your own PHP binaries, instructions can be found on the
Wiki.PECL For Windows
Which version do I choose?
IIS
If you are using PHP as FastCGI with IIS you should use the Non-Thread Safe (NTS) versions of PHP.
Apache
Please use the Apache builds provided by Apache Lounge.
They provide VC15 and VS16 builds of Apache for x86 and x64.
We use their binaries to build the Apache SAPIs.With Apache, using the apache2handler SAPI, you have to use the Thread Safe (TS) versions of PHP.
VC15 & VS16
More recent versions of PHP are built with VC15 or VS16 (Visual Studio 2017 or 2019 compiler respectively) and
include improvements in performance and stability.— The VC15 and VS16 builds require to have the Visual C++ Redistributable for Visual Studio 2015-2019 x64 or x86 installed
TS and NTS
TS refers to multithread capable builds. NTS refers to single thread only builds. Use case for TS binaries involves interaction with
a multithreaded SAPI and PHP loaded as a module into a web server. For NTS binaries the widespread use case is interaction with a web server through
the FastCGI protocol, utilizing no multithreading (but also for example CLI).What is PGO?
Profile Guided Optimization is an optimization
feature available in Microsoft’s Visual C++ compiler that allows you to optimize an output file based on profiling data collected during test runs of the application or module.Links:
- PGO on MSDN
- Visual C++ Team Blog — PGO with PHP
- PHP PGO build for maximum performance (old)
amd64 (x86_64) Builds
PHP 7 provides full 64-bit support. The x64 builds of PHP 7 support native 64-bit integers, LFS, 64-bit memory_limit and much more.
x64 builds are recommended (almost all Windows installations support x64).
Long and multibyte path
PHP 7.1+ supports long and UTF-8 paths. See the manual for details.
Archives
Past releases are available from our archives, older versions
not found there can be found at the Museum. -
PHP 8.3
8.3 has no release.
PHP 8.2 (8.2.11)
Download source code [26.16MB]
Download tests package (phpt) [15.61MB]
VS16 x64 Non Thread Safe (2023-Sep-26 15:55:26)
-
Zip
[30.24MB]
sha256: 2f603db80f0e4ffd0330140d12926a822e47f9825fd0adbb55611857aa1b4109 -
Debug Pack
[24.53MB]
sha256: f0f0e5ea6f498ffd25e0d4a48ade2428dcfdcc184c21f475788b89376a0e247a -
Development package (SDK to develop PHP extensions)
[1.24MB]
sha256: 7ecbc45a7e648011732579862cf514f5093e8c0ff28a6fb5ddf593a59c2664c3
VS16 x64 Thread Safe (2023-Sep-26 16:01:20)
-
Zip
[30.35MB]
sha256: a60bf6859edd0e7a08561ba7510c6b8a2e69ca60ba7998dadc66d31c5e99b386 -
Debug Pack
[24.54MB]
sha256: 120d5c0e60355bcae427be471d7f96f249225c5212062d98c7f5ab793000a6b0 -
Development package (SDK to develop PHP extensions)
[1.24MB]
sha256: 2f17d4a84a43eda75b8e4e3253db0402f62e67091e410b8a8e2bdc3e66527aa1
VS16 x86 Non Thread Safe (2023-Sep-26 16:13:48)
-
Zip
[27.14MB]
sha256: 0361ec9937586f52b045200d16ec809ac2809ffbbb70f90020a71d5595154e92 -
Debug Pack
[25.13MB]
sha256: 22619eee6d51dce42d95db088513041e59ecd1061a0cff0de4f5621d335e0fce -
Development package (SDK to develop PHP extensions)
[1.24MB]
sha256: 640c8cd78ba711958cdb889ce935c59e67c341f4a50fe22f42f2fd051403023c
VS16 x86 Thread Safe (2023-Sep-26 15:55:42)
-
Zip
[27.12MB]
sha256: a19013c2725417d8e11f633940bc5101d4a09f36c4f5f2bdca8af06d0559ecdd -
Debug Pack
[24.78MB]
sha256: 0f0d0f3290a3d17ae21c69479b3f2d3e0f27d51c725966b32ce68a2c4bbd16ed -
Development package (SDK to develop PHP extensions)
[1.24MB]
sha256: 8531ab5acda1a79ef5beb3df4c3ce69a34c91f430cb11475ce062fa3b31b353e
PHP 8.0 (8.0.30)
Download source code [23.48MB]
Download tests package (phpt) [13.56MB]
VS16 x64 Non Thread Safe (2023-Sep-01 18:07:28)
-
Zip
[25.53MB]
sha256: dfb70498ffa2c617f2f655a155564697e3c9cca41709938fd1a5997d1d5b0785 -
Debug Pack
[23.21MB]
sha256: 6d54cc8d92a65c8a6bdd61591badd6a15c921271245402691591500230416aae -
Development package (SDK to develop PHP extensions)
[1.16MB]
sha256: 85e9eafbdf7a18acb646eaa0abee33204151297fba95392976f38c49c0a91524
VS16 x64 Thread Safe (2023-Sep-01 14:57:52)
-
Zip
[25.63MB]
sha256: 8697972b5f704885e3444422ede2b5c25d025f614ea96dc67de74dc582471562 -
Debug Pack
[23.23MB]
sha256: 8d872df1ff623b64b5152451c2e86de58c9aebf2131db7cee6496b1527027e73 -
Development package (SDK to develop PHP extensions)
[1.16MB]
sha256: d15960def77f340b868767840fc5406b5a86822e634df7e96c130f91bc28499a
VS16 x86 Non Thread Safe (2023-Sep-01 14:38:10)
-
Zip
[23.65MB]
sha256: b649889ac73add91c02ec7f6fdb9182f148cfa3181761e32a1be02a3b1d85100 -
Debug Pack
[23.86MB]
sha256: bdc62ed306636b42857a2c6fb9685663a389b0a83c88a1cf6c19b201444ff19b -
Development package (SDK to develop PHP extensions)
[1.16MB]
sha256: a7dba1b187b06371a1f6e4f2eeddf6c938c286ce6eb70ee52393eadb2d8c9277
VS16 x86 Thread Safe (2023-Sep-01 14:36:42)
-
Zip
[23.64MB]
sha256: 8dec05f39e6618ee20e252b180d69f8cd0162a3dd2545321593d8f4f44f4af52 -
Debug Pack
[23.52MB]
sha256: 3de68c50c6dc674993860cd6a05f56b20e0c11e909af5c71ffcb9f48010a120b -
Development package (SDK to develop PHP extensions)
[1.16MB]
sha256: d84e35170de73cf5e0240b81fb38bb1af461b508e7f1ec0aec4686351249b672
-
Zip
Current Stable
PHP 8.2.11 (Changelog)
-
php-8.2.11.tar.gz (sig) [18,625Kb] 28 Sep 2023
48b1b41279a678a4d4afcd0b256ed921ebf2a91febb0634fdc4449b91c75799f -
php-8.2.11.tar.bz2 (sig) [15,014Kb] 28 Sep 2023
38192daeffabf4af6c427bf17ac1f82565d9c7522e0dbd32215162944434b28b -
php-8.2.11.tar.xz (sig) [11,764Kb] 28 Sep 2023
29af82e4f7509831490552918aad502697453f0869a579ee1b80b08f9112c5b8 -
Windows downloads
GPG Keys for PHP 8.2
Old Stable
PHP 8.1.24 (Changelog)
-
php-8.1.24.tar.gz (sig) [18,255Kb] 28 Sep 2023
d6001a5c16765cd1897609fc71ff083e35db9a28c8874a1ff191cdebe80a6460 -
php-8.1.24.tar.bz2 (sig) [14,764Kb] 28 Sep 2023
b0ae5804a9ad53a7e28d0a32629495f816f935b10830c71f4ec15827185a73c9 -
php-8.1.24.tar.xz (sig) [11,517Kb] 28 Sep 2023
ee61f6232bb29bd2e785daf325d2177f2272bf80d086c295a724594e710bce3d -
Windows downloads
GPG Keys for PHP 8.1
Old Stable
PHP 8.0.30 (Changelog)
-
php-8.0.30.tar.gz (sig) [16,080Kb] 03 Aug 2023
449d2048fcb20a314d8c218097c6d1047a9f1c5bb72aa54d5d3eba0a27a4c80c -
php-8.0.30.tar.bz2 (sig) [12,884Kb] 03 Aug 2023
98a9cb6a0e27a6950cdf4b26dcac48f2be2d936d5224a502f066cf3d4cf19b92 -
php-8.0.30.tar.xz (sig) [10,567Kb] 03 Aug 2023
216ab305737a5d392107112d618a755dc5df42058226f1670e9db90e77d777d9 -
Windows downloads
GPG Keys for PHP 8.0
GPG Keys
The releases are tagged and signed in the PHP Git Repository.
The following official GnuPG keys of the current PHP Release Manager can be used
to verify the tags:
PHP 8.2
pub rsa4096 2021-04-01 [SC] 1198 C011 7593 497A 5EC5 C199 286A F1F9 8974 69DC uid [ultimate] Pierrick Charron <pierrick@php.net> sub rsa4096 2021-04-01 [E] pub rsa4096 2021-04-26 [SC] [expires: 2025-11-24] 39B6 4134 3D8C 104B 2B14 6DC3 F9C3 9DC0 B969 8544 uid [ultimate] Ben Ramsey <ramsey@php.net> sub rsa4096 2021-04-26 [E] [expires: 2025-11-24] pub rsa4096 2021-03-26 [SC] [expires: 2030-03-26] E609 13E4 DF20 9907 D8E3 0D96 659A 97C9 CF2A 795A uid [ultimate] Sergey Panteleev <sergey@php.net> uid [ultimate] Sergey Panteleev <sergey@s-panteleev.ru> uid [ultimate] Sergey Panteleev <sergey@sergeypanteleev.com> sub rsa4096 2021-03-26 [E] [expires: 2025-03-26]
PHP 8.1
pub 2048R/31CBD89E 2016-12-08 Key fingerprint = 5289 95BF EDFB A719 1D46 839E F9BA 0ADA 31CB D89E uid Joe Watkins <krakjoe@php.net> pub rsa4096 2021-04-26 [SC] [expires: 2025-11-24] 39B6 4134 3D8C 104B 2B14 6DC3 F9C3 9DC0 B969 8544 uid [ultimate] Ben Ramsey <ramsey@php.net> sub rsa4096 2021-04-26 [E] [expires: 2025-11-24] pub rsa4096 2021-04-01 [SC] F1F6 9223 8FBC 1666 E5A5 CCD4 199F 9DFE F6FF BAFD uid [ultimate] Patrick Allaert <patrickallaert@php.net> sub rsa4096 2021-04-01 [E]
PHP 8.0
pub 4096R/70D12172 2017-04-14 [expires: 2024-04-21] Key fingerprint = 1729 F839 38DA 44E2 7BA0 F4D3 DBDB 3974 70D1 2172 uid Sara Golemon <pollita@php.net> pub rsa4096 2020-05-09 [SC] [expires: 2024-05-08] BFDD D286 4282 4F81 18EF 7790 9B67 A5C1 2229 118F uid [ultimate] Gabriel Caruso (Release Manager) <carusogabriel@php.net> sub rsa4096 2020-05-09 [E] [expires: 2024-05-08] pub rsa4096 2022-08-30 [SC] [expires: 2024-08-29] 2C16 C765 DBE5 4A08 8130 F1BC 4B9B 5F60 0B55 F3B4 uid [ultimate] Gabriel Caruso <carusogabriel@php.net> sub rsa4096 2022-08-30 [E] [expires: 2024-08-29] pub rsa4096 2021-04-26 [SC] [expires: 2025-11-24] 39B6 4134 3D8C 104B 2B14 6DC3 F9C3 9DC0 B969 8544 uid [ultimate] Ben Ramsey <ramsey@php.net> sub rsa4096 2021-04-26 [E] [expires: 2025-11-24]
A full list of GPG keys used for current and older releases is also
available.
The PHP Interpreter
PHP is a popular general-purpose scripting language that is especially suited to
web development. Fast, flexible and pragmatic, PHP powers everything from your
blog to the most popular websites in the world. PHP is distributed under the
PHP License v3.01.
Documentation
The PHP manual is available at php.net/docs.
Installation
Prebuilt packages and binaries
Prebuilt packages and binaries can be used to get up and running fast with PHP.
For Windows, the PHP binaries can be obtained from
windows.php.net. After extracting the archive the
*.exe
files are ready to use.
For other systems, see the installation chapter.
Building PHP source code
For Windows, see Build your own PHP on Windows.
For a minimal PHP build from Git, you will need autoconf, bison, and re2c. For
a default build, you will additionally need libxml2 and libsqlite3.
On Ubuntu, you can install these using:
sudo apt install -y pkg-config build-essential autoconf bison re2c \
libxml2-dev libsqlite3-dev
On Fedora, you can install these using:
sudo dnf install re2c bison autoconf make libtool ccache libxml2-devel sqlite-devel
Generate configure:
Configure your build. --enable-debug
is recommended for development, see
./configure --help
for a full list of options.
# For development
./configure --enable-debug
# For production
./configure
Build PHP. To speed up the build, specify the maximum number of jobs using -j
:
The number of jobs should usually match the number of available cores, which
can be determined using nproc
.
Testing PHP source code
PHP ships with an extensive test suite, the command make test
is used after
successful compilation of the sources to run this test suite.
It is possible to run tests using multiple cores by setting -jN
in
TEST_PHP_ARGS
:
make TEST_PHP_ARGS=-j4 test
Shall run make test
with a maximum of 4 concurrent jobs: Generally the maximum
number of jobs should not exceed the number of cores available.
The qa.php.net site provides more detailed info about
testing and quality assurance.
Installing PHP built from source
After a successful build (and test), PHP may be installed with:
Depending on your permissions and prefix, make install
may need super user
permissions.
PHP extensions
Extensions provide additional functionality on top of PHP. PHP consists of many
essential bundled extensions. Additional extensions can be found in the PHP
Extension Community Library — PECL.
Contributing
The PHP source code is located in the Git repository at
github.com/php/php-src. Contributions are most
welcome by forking the repository and sending a pull request.
Discussions are done on GitHub, but depending on the topic can also be relayed
to the official PHP developer mailing list internals@lists.php.net.
New features require an RFC and must be accepted by the developers. See
Request for comments — RFC and
Voting on PHP features for more information
on the process.
Bug fixes don’t require an RFC. If the bug has a GitHub issue, reference it in
the commit message using GH-NNNNNN
. Use #NNNNNN
for tickets in the old
bugs.php.net bug tracker.
Fix GH-7815: php_uname doesn't recognise latest Windows versions
Fix #55371: get_magic_quotes_gpc() throws deprecation warning
See Git workflow for details on how pull
requests are merged.
Guidelines for contributors
See further documents in the repository for more information on how to
contribute:
- Contributing to PHP
- PHP coding standards
- Mailing list rules
- PHP release process
Credits
For the list of people who’ve put work into PHP, please see the
PHP credits page.
If you’re into web development then it’s likely that you will need to learn PHP to develop the back-end database of your website. And nowadays web development is going in a craze. Therefore today we’re going to show you How to Install PHP on Windows 11. Follow this tutorial step by step and you’ll be good to go.
Video Tutorial: How to Install PHP on Windows 11
Step 1: Download PHP For Windows 11
1) Firstly we will download the latest version of PHP available on the internet. Follow the below-provided link to download PHP for window 11. There simply click on the Zip
button under PHP 8.0(8.0.9)
section.
Download PHP Here: https://windows.php.net/download/
Step 2: Extract Zip File
1) Open up the folder where the downloaded .zip
file is available, right-click on the file and click on the Extract All
button.
2) In the extraction window click on the Browse
button.
3) And create a New Folder with the name PHP8
. After that click on the Select Folder
button.
4) Now in the extraction window simply click on the Extract
button.
Step 3: Set Up Environment Variables
1) Press Windows button, type Environment Variables and hit Enter.
2) Now click on the Environment Variable
button.
3) Now, select the Path
variable by simply clicking on it and after that click on the Edit
button.
4) Now click on the New
button and paste the location we’ve provided below in this blank field and click the Ok
button.
Location: C:\php8
Also Read:How to Run C in Visual Studio Code on Mac OS Big Sur
Step 4: Check PHP Version
1) To check if PHP is installed properly or not, open up your command prompt by pressing the Windows button, type cmd
and press enter.
2) In the command prompt type, php --version
and press enter to check the installed version of PHP.
Последнее обновление: 04.06.2021
Есть разные способы установки всего необходимого программного обеспечения. Мы можем устанавливать компоненты по отдельности, а можем использовать уже готовые
сборки на подобие Denwer или EasyPHP. В подобных сборках компоненты уже имеют начальную настройку и уже готовы для создания сайтов. Однако рано или поздно разработчикам
все равно приходится прибегать к установке и конфигурации отдельных компонентов, подключения других модулей. Поэтому мы будем устанавливать все компоненты по отдельности.
В качестве операционной системы будет использоваться Windows.
Что подразумевает установка PHP? Во-первых, нам нужен интерпретатор PHP. Во-вторых, необходим веб-сервер, например, Apache, с помощью которого мы сможем обращаться
к ресурсам создаваемого нами сайта.
Для установки PHP перейдем на офсайт разработчиков https://www.php.net/downloads. На странице загрузок мы можем найти различные дистрибутивы
для операционной системы Linux. Если нашей операционной системой является Windows, то нам надо загрузить один из пакетов со страницы https://windows.php.net/download.
Загрузим zip-пакет последнего выпуска PHP, учитывая разрядность операционной системы, на которую надо установить PHP. Для 64-x разрядной:
Для 32-x разрядной:
Интерпретатор PHP имеет две версии: Non Thread Safe и Thread Safe. В чем разниц между ними?
Версия Thread Safe
позволяет задействовать многопоточность, тогда как Non Thread Safe
— однопоточная версия.
Выбрем версию Thread Safe.
Распакуем загруженный архив в папку, которую назовем php. Пусть эта папка у нас будет располагаться в корне диска C.
Теперь нам надо выполнить минимальную конфигурацию PHP. Для этого зайдем в распакованный архив и найдем там файл php.ini-development.
Это файл
начальной конфигурации интерпретатора. Переименуем этот файл в php.ini и затем откроем его в текстовом редакторе.
Найдем в файле строку:
;extension_dir = "ext"
Эта строка указывает на каталог с подключаемыми расширениями для PHP. Расширения позволяют задействовать нам некоторую дополнительную функциональность,
например, работу с базой данных. Все расширения находятся в распакованном каталоге ext.
Раскомментируем эту строку, убрав точку с запятой и укажем полный путь к папке расширений php:
extension_dir = "C:\php\ext"
Остальное содержимое файла оставим без изменений.
Теперь установим веб-сервер.