Repolode
php

php/php-src

The PHP interpreter, a general-purpose scripting language especially suited to web development.

Stars
40,537
Forks
8,233
Open issues
2,176
Last commit
1 hour ago

What is it?

PHP is a general-purpose scripting language, widely used for building websites and web applications. This repository holds the source code of the PHP interpreter itself, written in C, which is used to build and install the PHP runtime.

The repository covers building PHP from source on Linux, macOS and Windows, with configure options for development (debug builds) and production. It ships an extensive test suite run with make test, which can be parallelized or limited to specific directories. Additional functionality is provided through extensions, which can be installed via PIE or the older PECL system.

Developers who want to contribute bug fixes can submit pull requests directly, while new language features require an RFC accepted by the PHP developers. The project is distributed under the BSD-3-Clause license.

Key features

  • 01Builds the PHP interpreter from C source on Linux, macOS and Windows.
  • 02Includes an extensive test suite runnable with make test.
  • 03Supports debug and production build configurations via configure flags.
  • 04Extends functionality through bundled and installable extensions.
  • 05Accepts contributions through GitHub pull requests and an RFC process for new features.

Use cases

  • Compiling a custom PHP runtime from source with specific extensions enabled.
  • Running PHP's test suite to validate changes to the interpreter.
  • Contributing bug fixes or language features to the PHP project.

Quick start

  1. 1

    Install build prerequisites on Ubuntu

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

    Generate the configure script

    ./buildconf
  3. 3

    Configure the build (production defaults)

    ./configure
  4. 4

    Compile PHP using multiple jobs

    make -j4

Things to know

  • Building from source requires several system build tools and libraries.
  • Prebuilt Windows binaries come from a separate download site rather than the repository.

Topics

FAQ

What is php-src?
The PHP interpreter, a general-purpose scripting language especially suited to web development. PHP is a general-purpose scripting language, widely used for building websites and web applications. This repository holds the source code of the PHP interpreter itself, written in C, which is used to build and install the PHP runtime.
Is php-src free to use? What license does it have?
php-src is open source under the BSD-3-Clause license. Check the license terms before using it in commercial products.
Is php-src still maintained?
Actively maintained. The last commit to php-src was on Oct 21, 2026.
What can I use php-src for?
Compiling a custom PHP runtime from source with specific extensions enabled. Running PHP's test suite to validate changes to the interpreter. Contributing bug fixes or language features to the PHP project.
How do I install php-src?
Install build prerequisites on Ubuntu: sudo apt install -y pkg-config build-essential autoconf bison re2c libxml2-dev libsqlite3-dev Generate the configure script: ./buildconf Configure the build (production defaults): ./configure Compile PHP using multiple jobs: make -j4
Where can I get php-src?
The source code and installation instructions are on GitHub: https://github.com/php/php-src

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects