- This page is intended to help setup a development environment for PHP, if mistakes are found
+ This page is intended to help set up a development environment for PHP, if mistakes are found
please report them.
@@ -22,28 +30,30 @@
Improving PHP requires a working build environment to test changes, the following section deals with setting up a working build environment.
- Your build environment should have an appropriate toolchain that includes a working C compiler,
- for those not working in Microsoft Windows, you will need a working, compatible autotools installation, and at the very least a shared copy of zlib.
+ Your build environment should have an appropriate toolchain that includes a working C compiler.
+ For those not working in Microsoft Windows, you will need a working, compatible autotools installation, and at the very least a shared copy of zlib.
For most *nix like operating systems, some external dependencies may be required to bring a build to completion;
- if a build fails because of missing headers or libraries, issuing a variant of the following command should resolve those dependencies, allowing the build to continue:
-
+ if a build fails because of missing headers or libraries, issuing a variant of the following command should resolve those dependencies, allowing the build to continue.
+
+
[sudo] yum|apt|port install package[-dev[el]]
+
+
+ For those working in Ubuntu Linux, you can run the following command to automate the installation of dependencies.
+
+
+
sudo apt build-dep php
+
- For those working in Ubuntu Linux, you can run the following command to automate the installation of dependencies:
-
-
sudo apt-get build-dep php5
-
- If the compilation of an extension should fail because of missing dependencies, Ubuntu Linux can attempt to automate the resolution of those dependencies by issuing:
-
-
sudo apt-get build-dep php5-extname
-
+ If the compilation of an extension fails because of missing dependencies, Ubuntu Linux can attempt to automate the resolution of those dependencies by issuing:
+
+
sudo apt build-dep php-<extname>
+
- The following table shows what is required for Microsoft Windows users to build PHP:
+ The following table shows what is required for Microsoft Windows users to build supported PHP versions:
Note: If a Windows SDK is required, it is advised to install the SDK before Visual Studio.
@@ -91,34 +110,34 @@
Workspace Preparation
- Windows users should now download and unzip the PHP SDK to their workspace and execute the following commands in an appropriate Visual Studio Console:
+ Windows users should now download and unzip the PHP SDK to their workspace and execute the following commands in an appropriate Visual Studio 2019/2022 Developer Command Prompt:
- Visual Studio 2008:
-
-
setenv /xp /Release /x86
-
- Visual Studio 2008 and 2012:
-
-
cd C:\path-to-workspace
-
bin\phpsdk_setvars.bat
-
bin\phpsdk_buildtree.bat phpdev
-
- Windows should now change to the directory C:\path-to-workspace\phpdev\VCXX\XARCH, and consider it the root of the workspace for the current build.
+ Visual Studio 2019 and 2022:
+
+
+
cd C:\path-to-workspace
+bin\phpsdk_setvars.bat
+bin\phpsdk_buildtree.bat phpdev
+
+
+ Windows should now change to the directory C:\path-to-workspace\phpdev\VSXX\XARCH, and consider it the root of the workspace for the current build.
The next step for everyone is to obtain the versioned PHP sources via git:
-
+ BRANCH should be replaced with an appropriate branch name, for example, PHP-8.5.
- At this point you have a working build environment and the vanilla sources for your chosen branch of PHP, it is a good idea, before you change anything at all, to create a new branch and switch to it, in preparation for your awesome changes to come:
-
-
git checkout -b my-awesome-changes
-
+ At this point you have a working build environment and the vanilla sources for your chosen branch of PHP, it is a good idea, before you change anything at all, to create a new branch and switch to it, in preparation for your awesome changes to come.
+
+
git checkout -b my-awesome-changes
+
@@ -126,50 +145,50 @@
All operating systems now converge on (near as makes no difference) the same solutions for the rest of the build process:
-
-
buildconf: generates the configure script for PHP
-
configure: configures the build of PHP and creates Makefile
-
make: builds PHP
-
make test: runs testsuite
-
make install: installs PHP
-
-
- For Microsoft Windows operating systems, those commands looks like this:
-
-
buildconf
-
configure --with-prefix=C:\my-awesome-php
-
nmake
-
nmake test
-
nmake install
-
+
+
buildconf: generates the configure script for PHP
+
configure: configures the build of PHP and creates Makefile
+
make: builds PHP
+
make test: runs testsuite
+
make install: installs PHP
+
+
+ For Microsoft Windows operating systems, those commands look like this:
+
+
buildconf
+configure --with-prefix=C:\my-awesome-php
+nmake
+nmake test
+nmake install
+
While for the rest of us, those commands look like this:
-
-
./buildconf
-
./configure --prefix=/opt/my-awesome-php
-
make
-
make test
-
make install
-
+
+
./buildconf
+./configure --prefix=/opt/my-awesome-php
+make
+make test
+make install
+
- The configure script has the ability to customize almost every aspect of PHP, to elicit help at the console pass --help
+ The configure script can customize almost every aspect of PHP, to elicit help at the console pass --help
as the only argument to configure
When configure executes, it saves the options passed in to a re-usable config.nice which executes configure when invoked.
- Upon successful completion of a build, it is recommended to run the test suite, this will help you to identify regression problems in your work,
+ Upon successful completion of a build, it is recommended to run the test suite; this will help you to identify regression problems in your work,
running the test suite can take a while; go out for a run, or a burger.
It is also possible to run a set (directory) of tests in the following way:
-
The PHP development team announces the immediate availability of PHP 8.4.19. This is a bug fix release.
+
+
All PHP 8.4 users are encouraged to upgrade to this version.
+
+
For source downloads of PHP 8.4.19 please visit our downloads page,
+Windows source and binaries can also be found there.
+The list of changes is recorded in the ChangeLog.
+
The PHP development team announces the immediate availability of PHP 8.4.19. This is a bug fix release.
+
+
All PHP 8.4 users are encouraged to upgrade to this version.
+
+
For source downloads of PHP 8.4.19 please visit our downloads page,
+Windows source and binaries can also be found there.
+The list of changes is recorded in the ChangeLog.
+
The PHP development team announces the immediate availability of PHP 8.5.4. This is a bug fix release.
+
+
All PHP 8.5 users are encouraged to upgrade to this version.
+
+
For source downloads of PHP 8.5.4 please visit our downloads page,
+Windows source and binaries can also be found there.
+The list of changes is recorded in the ChangeLog.
+
The PHP development team announces the immediate availability of PHP 8.5.4. This is a bug fix release.
+
+
All PHP 8.5 users are encouraged to upgrade to this version.
+
+
For source downloads of PHP 8.5.4 please visit our downloads page,
+Windows source and binaries can also be found there.
+The list of changes is recorded in the ChangeLog.
+
+
Date: Tue, 17 Mar 2026 12:00:29 +0100
Subject: [PATCH 008/300] Add natural URL shortcuts for operators and language
constructs (#767) (#1814)
Adds intuitive shortcut aliases like php.net/operator.precedence,
php.net/backtick.operator, php.net/string.type, php.net/statements,
etc. Supports both dot and hyphen separators for consistency.
---
error.php | 32 ++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)
diff --git a/error.php b/error.php
index 6b4c2c6f1d..3feda731ca 100644
--- a/error.php
+++ b/error.php
@@ -398,6 +398,38 @@
"htaccess" => "configuration.changes",
"php_value" => "configuration.changes",
+ "operator.precedence" => "language.operators.precedence",
+ "operator-precedence" => "language.operators.precedence",
+ "precedence" => "language.operators.precedence",
+ "arithmetic.operators" => "language.operators.arithmetic",
+ "arithmetic-operators" => "language.operators.arithmetic",
+ "assignment.operators" => "language.operators.assignment",
+ "assignment-operators" => "language.operators.assignment",
+ "bitwise.operators" => "language.operators.bitwise",
+ "bitwise-operators" => "language.operators.bitwise",
+ "comparison.operators" => "language.operators.comparison",
+ "comparison-operators" => "language.operators.comparison",
+ "error.control" => "language.operators.errorcontrol",
+ "error-control" => "language.operators.errorcontrol",
+ "backtick" => "language.operators.execution",
+ "backtick.operator" => "language.operators.execution",
+ "backtick-operator" => "language.operators.execution",
+ "execution.operator" => "language.operators.execution",
+ "increment.operators" => "language.operators.increment",
+ "increment-operators" => "language.operators.increment",
+ "logical.operators" => "language.operators.logical",
+ "logical-operators" => "language.operators.logical",
+ "string.operators" => "language.operators.string",
+ "string-operators" => "language.operators.string",
+ "type.operators" => "language.operators.type",
+ "type-operators" => "language.operators.type",
+ "string.type" => "language.types.string",
+ "array.type" => "language.types.array",
+ "object.type" => "language.types.object",
+ "statements" => "control-structures.intro",
+ "control.structures" => "control-structures.intro",
+ "control-structures" => "control-structures.intro",
+
"ternary" => "language.operators.comparison",
"instanceof" => "language.operators.type",
"if" => "language.control-structures",
From 67c8ec80811cdcf152203b14a0ad536956ea165f Mon Sep 17 00:00:00 2001
From: Louis-Arnaud
Date: Tue, 17 Mar 2026 12:01:22 +0100
Subject: [PATCH 009/300] Add missing trigger_error() deprecation to PHP 8.4
release page (#1233) (#1810)
The deprecation of passing E_USER_ERROR to trigger_error() was
documented in the ChangeLog but missing from the release announcement.
---
releases/8.4/languages/en.php | 1 +
releases/8.4/release.inc | 1 +
2 files changed, 2 insertions(+)
diff --git a/releases/8.4/languages/en.php b/releases/8.4/languages/en.php
index 86a17799ed..884102164c 100644
--- a/releases/8.4/languages/en.php
+++ b/releases/8.4/languages/en.php
@@ -51,6 +51,7 @@
'bc_standard' => 'stream_bucket_make_writeable() and stream_bucket_new() now return an instance of StreamBucket instead of stdClass.',
'bc_core' => 'exit() behavioral change.',
'bc_warnings' => 'E_STRICT constant has been deprecated.',
+ 'bc_trigger_error' => 'Passing E_USER_ERROR to trigger_error() is now deprecated.',
'footer_title' => 'Better performance, better syntax, improved type safety.',
'footer_description' => '
For source downloads of PHP 8.4 please visit the downloads page. Windows binaries can be found on the PHP for Windows site. The list of changes is recorded in the ChangeLog.
From 9516d640babc95e8e45ef7f7a3413abf6f0b3786 Mon Sep 17 00:00:00 2001
From: Louis-Arnaud
Date: Tue, 17 Mar 2026 12:01:52 +0100
Subject: [PATCH 010/300] Fix weekday dropdown mismatch in submit-event form
(#1218) (#1809)
The $days array in submit-event.php used the current year implicitly
while layout.inc hardcoded 2012, causing weekday index mismatches
in the recurring event preview.
---
submit-event.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/submit-event.php b/submit-event.php
index 7b5fdabed6..2d2ac20044 100644
--- a/submit-event.php
+++ b/submit-event.php
@@ -152,7 +152,7 @@
// Generate days and months arrays for form
for ($i = 1; $i <= 7; $i++) {
- $days[$i] = date('l', mktime(12, 0, 0, 4, $i));
+ $days[$i] = date('l', mktime(12, 0, 0, 4, $i, 2012));
}
for ($i = 1; $i <= 12; $i++) {
$months[$i] = date('F', mktime(12, 0, 0, $i, 1));
From 4ec9adf3e1321b99615467e51ae77bae7bd8d890 Mon Sep 17 00:00:00 2001
From: Derick Rethans
Date: Tue, 17 Mar 2026 10:56:14 +0000
Subject: [PATCH 011/300] Remove mention of 'windows.php.net'
---
downloads.php | 2 +-
sites.php | 8 --------
2 files changed, 1 insertion(+), 9 deletions(-)
diff --git a/downloads.php b/downloads.php
index fd123c3f35..5275d380db 100644
--- a/downloads.php
+++ b/downloads.php
@@ -237,7 +237,7 @@ function option(string $value, string $desc, $attributes = []): string
Binaries
- Binaries are available for
+ Binaries are available for
Microsoft Windows. The PHP project does not currently release binary packages
for other platforms such as Linux or macOS, but they are packaged by distributions
and other providers. For more information, see:
diff --git a/sites.php b/sites.php
index 65dd26dfa7..cfa45430f3 100644
--- a/sites.php
+++ b/sites.php
@@ -142,13 +142,6 @@ interface to it. There you can browse the history (and latest versions) of the
has a wiki section and everyone is able to apply for wiki commit access.
- 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.
-
The PHP Developers Profiles
SIDEBAR_DATA;
From 02efc4702167d5ec101974e94ffdea762d0e44a5 Mon Sep 17 00:00:00 2001
From: Derick Rethans
Date: Tue, 17 Mar 2026 10:56:34 +0000
Subject: [PATCH 012/300] Use https:// and canonical names for sites
---
sites.php | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/sites.php b/sites.php
index cfa45430f3..2bd6bda41d 100644
--- a/sites.php
+++ b/sites.php
@@ -6,13 +6,13 @@
PHP.net: A Tourist's Guide
- Everyone knows the php.net site. All of us went there sooner or later,
+ Everyone knows the www.php.net site. All of us went there sooner or later,
and will keep going back there. This is the central reference point for PHP
users, and there is a wealth of information there. Not all of it is obvious.
Come with me, I'll show you.
@@ -25,7 +25,7 @@
This is the home of the download page, for
everyone to get the latest version of the PHP source code and binaries
for Windows. The current and next-to-current versions are available there.
- (There is also a PHP Museum, which has
+ (There is also a PHP Museum, which has
all of the source distributions since June 1996.)
It is recommended to use x64 builds of PHP as almost all Windows installations currently support x64.
+Thread Safety
+
NTS builds are for single-threaded use cases, typically PHP running via FastCGI or on the CLI. TS builds support multithreaded SAPIs and are intended for PHP loaded as a web server module. So, if you want to use PHP as FastCGI with IIS, use the Non-Thread Safe (NTS) builds of PHP, or if you want to use the Apache HTTP Server, use the Thread Safe (TS) builds of PHP.
+Visual Studio Versions
+
The builds below are built using Visual Studio 2019 (VS16) or Visual Studio 2022 (VS17) compiler. They require the Visual C++ Redistributable for Visual Studio 2015-2022 x64 or x86 installed.
-On the command line, run the following commands:
+ This installation method uses binaries provided by a third-party provider.
+ It contains patches to the PHP source code added by the build provider,
+ over which the PHP project has no control.
+
+
+
+
+ Specifically, this provider includes a
+ patch that adds telemetry to the Apache 2 and PHP-FPM modules.
+
-On the command line, run the following commands:
+ This installation method uses binaries provided by your Linux distribution.
+ It contains patches to the PHP source code added by the build provider,
+ over which the PHP project has no control.
+
-On the command line, run the following commands:
+ This installation method uses binaries provided by a third-party provider.
+ It contains patches to the PHP source code added by the build provider,
+ over which the PHP project has no control.
+
-On the command line, run the following commands:
+ This installation method uses binaries provided by your Linux distribution.
+ It contains patches to the PHP source code added by the build provider,
+ over which the PHP project has no control.
+
-On the command line, run the following commands:
+ This installation method uses binaries provided by a third-party provider.
+ It contains patches to the PHP source code added by the build provider,
+ over which the PHP project has no control.
+
-On the command line, run the following commands:
+ This installation method uses binaries provided by your Linux distribution.
+ It contains patches to the PHP source code added by the build provider,
+ over which the PHP project has no control.
+
-On the command line, run the following commands:
+ This installation method uses binaries provided by a third-party provider.
+ It contains patches to the PHP source code added by the build provider,
+ over which the PHP project has no control.
+
+
+
+ Specifically, this provider includes a
+ patch that adds telemetry to the Apache 2 and PHP-FPM modules.
+
-On the command line, run the following commands:
+ This installation method uses binaries provided by your Linux distribution.
+ It contains patches to the PHP source code added by the build provider,
+ over which the PHP project has no control.
+
+
+
+On the command line, run the commands below:
# Update the package lists.
From 938c8c488ada051ff99d5f184f9fc699ef2ec04a Mon Sep 17 00:00:00 2001
From: Derick Rethans
Date: Wed, 25 Mar 2026 15:33:11 +0000
Subject: [PATCH 017/300] Remove link to issue tracker here, as it only invites
spam and support questions
---
downloads.php | 7 -------
1 file changed, 7 deletions(-)
diff --git a/downloads.php b/downloads.php
index 55cefece75..69d78f454b 100644
--- a/downloads.php
+++ b/downloads.php
@@ -203,13 +203,6 @@ function option(string $value, string $desc, $attributes = []): string
-
-
- Did you find a mistake? Didn't find what you were looking for?
- Please submit an issue.
-