« Back to Search  |  Reader Mode  |  Switch to Full Retro Site View Links: Stay in Reader  |  Retro Mode: ON  |  Original »
GitHub · Extracted in 678 ms

GitHub - php/php-src: The PHP Interpreter

Source: https://github.com/php/php-src

Repository navigation

php-src
Public

About

The PHP Interpreter

www.php.net

Resources

Readme BSD-3-Clause license

Contributing

Contributing

Security policy

Security policy Activity Custom properties

Stars

41.9k stars

Watchers

1.4k watching

Forks

8.6k forks Report repository
Branches

Tags
Go to Branches page Go to Tags page

Latest commit

 

History


151,657 Commits
View commit history for this file.

Folders and files

Name Name Last commit message Last commit date
.circleci .circleci    
.github .github    
TSRM TSRM    
Zend Zend    
benchmark benchmark    
build build    
docs-old docs-old    
docs docs    
ext ext    
main main    
pear pear    
sapi sapi    
scripts scripts    
tests tests    
win32 win32    
.editorconfig .editorconfig    
.gdbinit .gdbinit    
.gitattributes .gitattributes    
.gitignore .gitignore    
AGENTS.md AGENTS.md    
CODING_STANDARDS.md CODING_STANDARDS.md    
CONTRIBUTING.md CONTRIBUTING.md    
EXTENSIONS EXTENSIONS    
LICENSE LICENSE    
NEWS NEWS    
README.REDIST.BINS README.REDIST.BINS    
README.md README.md    
SECURITY.md SECURITY.md    
UPGRADING UPGRADING    
UPGRADING.INTERNALS UPGRADING.INTERNALS    
buildconf buildconf    
buildconf.bat buildconf.bat    
configure.ac configure.ac    
gcovr.cfg gcovr.cfg    
php.ini-development php.ini-development    
php.ini-production php.ini-production    
run-extra-tests.php run-extra-tests.php    
run-tests.php run-tests.php    

Repository files navigation

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:

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 ccache libxml2-devel sqlite-devel

On MacOS, you can install these using brew:

brew install autoconf bison re2c libiconv libxml2 sqlite

or with MacPorts:

sudo port install autoconf bison re2c libiconv libxml2 sqlite3

Generate configure:

./buildconf

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 the -j argument:

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:

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:

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:

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

Credits

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

About

The PHP Interpreter

www.php.net

Resources

Readme BSD-3-Clause license

Contributing

Contributing

Security policy

Security policy Activity Custom properties

Stars

41.9k stars

Watchers

1.4k watching

Forks

8.6k forks Report repository

Releases

Used by

Contributors

Languages