- Saved searches
- Use saved searches to filter your results more quickly
- License
- php/php-src
- Name already in use
- Sign In Required
- Launching GitHub Desktop
- Launching GitHub Desktop
- Launching Xcode
- Launching Visual Studio Code
- Latest commit
- Git stats
- Files
- README.md
- PHP: Hypertext Preprocessor
- PECL For Windows
- Which version do I choose?
- IIS
- Apache
- VC15 & VS16
- TS and NTS
- What is PGO?
- amd64 (x86_64) Builds
- Long and multibyte path
- Archives
Saved searches
Use saved searches to filter your results more quickly
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.
License
php/php-src
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Sign In Required
Please sign in to use Codespaces.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching Xcode
If nothing happens, download Xcode and try again.
Launching Visual Studio Code
Your codespace will open once ready.
There was a problem preparing your codespace, please try again.
Latest commit
Git stats
Files
Failed to load latest commit information.
README.md
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.
The PHP manual is available at php.net/docs.
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.
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
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 .
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.
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.
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:
For the list of people who’ve put work into PHP, please see the PHP credits page.
PHP: Hypertext Preprocessor
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
PECL extensions for Windows is being worked on. Windows DLL can be downloaded right from the PECL website.
The PECL extension release and snapshot build directories are browsable directly.
Which version do I choose?
IIS
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?
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.