- Notifications
You must be signed in to change notification settings - Fork7.9k
php/php-src
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
PHP is a popular general-purpose scripting language that is especially suited toweb development. Fast, flexible and pragmatic, PHP powers everything from yourblog to the most popular websites in the world. PHP is distributed under thePHP License v3.01.
The PHP manual is available atphp.net/docs.
Prebuilt packages and binaries can be used to get up and running fast with PHP.
For Windows, the PHP binaries can be obtained fromwindows.php.net. After extracting the archive the*.exe
files are ready to use.
For other systems, see theinstallation chapter.
For Windows, seeBuild your own PHP on Windows.
For a minimal PHP build from Git, you will need autoconf, bison, and re2c. Fora 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 libtool ccache libxml2-devel sqlite-devel
On MacOS, you can install these usingbrew
:
brew install autoconf bison re2c iconv libxml2 sqlite
or withMacPorts
:
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, whichcan be determined usingnproc
.
PHP ships with an extensive test suite, the commandmake test
is used aftersuccessful compilation of the sources to run this test suite.
It is possible to run tests using multiple cores by setting-jN
inTEST_PHP_ARGS
orTESTS
:
make TEST_PHP_ARGS=-j4test
Shall runmake test
with a maximum of 4 concurrent jobs: Generally the maximumnumber of jobs should not exceed the number of cores available.
Use theTEST_PHP_ARGS
orTESTS
variable to test only specific directories:
make TESTS=tests/lang/test
Theqa.php.net site provides more detailed info abouttesting and quality assurance.
After a successful build (and test), PHP may be installed with:
make install
Depending on your permissions and prefix,make install
may need superuserpermissions.
Extensions provide additional functionality on top of PHP. PHP consists of manyessential bundled extensions. Additional extensions can be found in the PHPExtension Community Library -PECL.
The PHP source code is located in the Git repository atgithub.com/php/php-src. Contributions are mostwelcome by forking the repository and sending a pull request.
Discussions are done on GitHub, but depending on the topic can also be relayedto the official PHP developer mailing listinternals@lists.php.net.
New features require an RFC and must be accepted by the developers. SeeRequest for comments - RFC andVoting on PHP features for more informationon the process.
Bug fixes don't require an RFC. If the bug has a GitHub issue, reference it inthe commit message usingGH-NNNNNN
. Use#NNNNNN
for tickets in the oldbugs.php.net bug tracker.
Fix GH-7815: php_uname doesn't recognise latest Windows versionsFix #55371: get_magic_quotes_gpc() throws deprecation warning
SeeGit workflow for details on how pullrequests are merged.
See further documents in the repository for more information on how tocontribute:
For the list of people who've put work into PHP, please see thePHP credits page.
About
The PHP Interpreter
Resources
License
Security policy
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Uh oh!
There was an error while loading.Please reload this page.