Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
P

php-src

> 编程语言
Open source

The PHP Interpreter

40.3K stars0 likes3 views
WebsiteGitHub

About

The PHP Interpreter

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:

bash
sudo apt install -y pkg-config build-essential autoconf bison re2c libxml2-dev libsqlite3-dev

On Fedora, you can install these using:

bash
sudo dnf install re2c bison autoconf make ccache libxml2-devel sqlite-devel

On MacOS, you can install these using brew:

bash
brew install autoconf bison re2c libiconv libxml2 sqlite

or with MacPorts:

bash
sudo port install autoconf bison re2c libiconv libxml2 sqlite3

Generate configure:

bash
./buildconf

Configure your build. --enable-debug is recommended for development, see ./configure --help for a full list of options.

bash
# 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:

bash
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:

bash
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:

bash
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:

bash
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 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 [email protected].

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
  • Internal documentation
  • Mailing list rules
  • PHP release process

Credits

For the list of people who've put work into PHP, please see the PHP credits page.

Issues· 2098 open

View all issuesOpen on GitHub
  • #19802

    Verify bundled deps using CI

    FeatureCategory: CIUpdated Sep 30, 2026
  • #24006

    Failed test: GH-18431 (Registering ZIP progress callback twice doesn't work) [ext/zip/tests/gh18431.phpt]

    BugStatus: Needs TriageUpdated Sep 29, 2026
  • #22558

    Tracing JIT: PHP-FPM worker segfaults on first request of a Symfony 8.1 application

    BugSAPI: fpmStatus: VerifiedUpdated Sep 29, 2026
  • #23983

    Function JIT (8.4+): wrong result after interrupts are handled in a loop

    BugCategory: JITExtension: opcacheStatus: VerifiedUpdated Sep 29, 2026
  • #23991

    JIT (opcache.jit=1235): hang in ir_schedule_topsort() and segfaults in zend_build_call_map() / ir_fix_bb_order()

    BugCategory: JITExtension: opcacheStatus: VerifiedUpdated Sep 29, 2026
  • #23990

    Consider deferring the "is"/"let" identifier deprecation to PHP 8.7

    Updated Sep 29, 2026
  • #23979

    Delayed fetch miscompile

    BugCategory: EngineStatus: VerifiedUpdated Sep 29, 2026
  • #23978

    PHP_STREAM_OPTION_READ_TIMEOUT is also used for socket write timeouts

    Updated Sep 29, 2026
  • #23958

    Variant analysis: 1 unfixed sibling safety gap in php-src

    Updated Sep 29, 2026
  • #23956

    Regression with MySQL 4.1 after mysqlnd security fix GHSA-r6x9-5r99-36j7

    BugExtension: mysqlndStatus: Needs TriageUpdated Sep 28, 2026

> Tags

C

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 30, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言