41,773
stars
+8
8,528
forks
1,354
watchers
19,114
prs
5,781
issues
70
releases
0
discussions
README
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 Modified BSD License (SPDX-License-Identifier: BSD-3-Clause). 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: shell sudo apt install -y pkg-config build-essential autoconf bison re2c libxml2-dev libsqlite3-dev On Fedora, you can install these using: shell sudo dnf install re2c bison autoconf make ccache libxml2-devel sqlite-devel On MacOS, you can install these using brew: shell brew install autoconf bison re2c libiconv libxml2 sqlite or with MacPorts: shell sudo port install autoconf bison re2c libiconv libxml2 sqlite3 Generate configure: shell ./buildconf Configure your build. --enable-debug is recommended for development, see ./configure --help for a full list of options. shell For development ./configure --enable-debug For production ./configure Build PHP. To speed up the build, specify the maximum number of jobs using the -j argument: shell make -j4 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. Tests run in parallel by default, using up to 10 detected logical processors. Set -jN in TEST_PHP_ARGS or TESTS to override the worker count: shell make TEST_PHP_ARGS=-j4 test This runs make test with a maximum of 4 concurrent jobs. Alternatively, use -j1 to run tests sequentially. Use the TEST_PHP_ARGS or TESTS variable to test only specific directories: shell make TESTS=tests/lang/ test 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: shell make install Depending on your permissions and prefix, make install may need superuser permissions. PHP extensions Extensions provide additional functionality on top of PHP. PHP consists of many essential bundled extensions. Additional extensions can be found on the PIE Extensions list, and installed with 🥧 PIE, the PHP Installer for Extensions or the deprecated PHP Extension Community
Top issues
#7817JIT segmentation fault in PHP 8.1202 comments · 2021-12-23#9208Enum case as Array key?56 comments · 2022-07-31#9993Bad performance with hard-coded GC_THRESHOLD_* values53 comments · 2022-11-23#11818macOS now crashes fork() process instead of just warning output50 comments · 2023-07-29#20262array_unique() with SORT_REGULAR returns duplicate values43 comments · 2025-10-22#8620Segmentation fault on exit when using ldap_bind()34 comments · 2022-05-24#14926PHP 8.3: "yield /*comment*/ from" is no longer a parse error ?32 comments · 2024-07-11#13989PHP checks the filesystem for file existing even if available in opcache and all opcache validations are disabled30 comments · 2024-04-17
Latest release
PHP 8.5.12 php-8.5.12 2026-10-21The PHP development team announces the immediate availability of PHP 8.5.12. This is a security release fixing two critical vulnerabilities (CVE-2026-109618, CVE-2026-109619) that can allow unauthenticated remote code execution. All PHP 8.5 users are strongly encouraged to update immediately. There are no complete mitigations, updating is the only safe choice. See the security advisory for details. For source downloads of PHP 8.5.12 please visit our downloads page, Windows source and binaries can also be found there. The list of changes is recorded in the ChangeLog.