xref: /PHP-8.0/README.md (revision f1d7f957)
1<div align="center">
2    <a href="https://php.net">
3        <img
4            alt="PHP"
5            src="https://www.php.net/images/logos/new-php-logo.svg"
6            width="150">
7    </a>
8</div>
9
10# The PHP Interpreter
11
12PHP is a popular general-purpose scripting language that is especially suited to
13web development. Fast, flexible and pragmatic, PHP powers everything from your
14blog to the most popular websites in the world. PHP is distributed under the
15[PHP License v3.01](LICENSE).
16
17[![Build status](https://travis-ci.org/php/php-src.svg?branch=master)](https://travis-ci.org/php/php-src)
18[![Build status](https://ci.appveyor.com/api/projects/status/meyur6fviaxgdwdy/branch/master?svg=true)](https://ci.appveyor.com/project/php/php-src)
19[![Build Status](https://dev.azure.com/phpazuredevops/php/_apis/build/status/php.php-src?branchName=master)](https://dev.azure.com/phpazuredevops/php/_build/latest?definitionId=1&branchName=master)
20[![Fuzzing Status](https://oss-fuzz-build-logs.storage.googleapis.com/badges/php.svg)](https://bugs.chromium.org/p/oss-fuzz/issues/list?sort=-opened&can=1&q=proj:php)
21
22## Documentation
23
24The PHP manual is available at [php.net/docs](https://php.net/docs).
25
26## Installation
27
28### Prebuilt packages and binaries
29
30Prebuilt packages and binaries can be used to get up and running fast with PHP.
31
32For Windows, the PHP binaries can be obtained from
33[windows.php.net](https://windows.php.net). After extracting the archive the
34`*.exe` files are ready to use.
35
36For other systems, see the [installation chapter](https://php.net/install).
37
38### Building PHP source code
39
40*For Windows, see [Build your own PHP on Windows](https://wiki.php.net/internals/windows/stepbystepbuild_sdk_2).*
41
42For a minimal PHP build from Git, you will need autoconf, bison, and re2c. For
43a default build, you will additionally need libxml2 and libsqlite3. On Ubuntu,
44you can install these using:
45
46    sudo apt install -y pkg-config build-essential autoconf bison re2c \
47                        libxml2-dev libsqlite3-dev
48
49Generate configure:
50
51    ./buildconf
52
53Configure your build. `--enable-debug` is recommended for development, see
54`./configure --help` for a full list of options.
55
56    # For development
57    ./configure --enable-debug
58    # For production
59    ./configure
60
61Build PHP. To speed up the build, specify the maximum number of jobs using `-j`:
62
63    make -j4
64
65The number of jobs should usually match the number of available cores, which
66can be determined using `nproc`.
67
68## Testing PHP source code
69
70PHP ships with an extensive test suite, the command `make test` is used after
71successful compilation of the sources to run this test suite.
72
73It is possible to run tests using multiple cores by setting `-jN` in
74`TEST_PHP_ARGS`:
75
76    make TEST_PHP_ARGS=-j4 test
77
78Shall run `make test` with a maximum of 4 concurrent jobs: Generally the maximum
79number of jobs should not exceed the number of cores available.
80
81The [qa.php.net](https://qa.php.net) site provides more detailed info about
82testing and quality assurance.
83
84## Installing PHP built from source
85
86After a successful build (and test), PHP may be installed with:
87
88    make install
89
90Depending on your permissions and prefix, `make install` may need super user
91permissions.
92
93## PHP extensions
94
95Extensions provide additional functionality on top of PHP. PHP consists of many
96essential bundled extensions. Additional extensions can be found in the PHP
97Extension Community Library - [PECL](https://pecl.php.net).
98
99## Contributing
100
101The PHP source code is located in the Git repository at
102[github.com/php/php-src](https://github.com/php/php-src). Contributions are most
103welcome by forking the repository and sending a pull request.
104
105Discussions are done on GitHub, but depending on the topic can also be relayed
106to the official PHP developer mailing list internals@lists.php.net.
107
108New features require an RFC and must be accepted by the developers. See
109[Request for comments - RFC](https://wiki.php.net/rfc) and
110[Voting on PHP features](https://wiki.php.net/rfc/voting) for more information
111on the process.
112
113Bug fixes don't require an RFC. If the bug has a GitHub issue, reference it in
114the commit message using `GH-NNNNNN`. Use `#NNNNNN` for tickets in the old
115[bugs.php.net](https://bugs.php.net) bug tracker.
116
117    Fix GH-7815: php_uname doesn't recognise latest Windows versions
118    Fix #55371: get_magic_quotes_gpc() throws deprecation warning
119
120See [Git workflow](https://wiki.php.net/vcs/gitworkflow) for details on how pull
121requests are merged.
122
123### Guidelines for contributors
124
125See further documents in the repository for more information on how to
126contribute:
127
128- [Contributing to PHP](/CONTRIBUTING.md)
129- [PHP coding standards](/CODING_STANDARDS.md)
130- [Mailinglist rules](/docs/mailinglist-rules.md)
131- [PHP release process](/docs/release-process.md)
132
133## Credits
134
135For the list of people who've put work into PHP, please see the
136[PHP credits page](https://php.net/credits.php).
137