• Stars
    star
    36,014
  • Rank 426 (Top 0.01 %)
  • Language
    C
  • License
    Other
  • Created over 13 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

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 PHP License v3.01.

Push Build status Fuzzing Status

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

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

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.

It is possible to run tests using multiple cores by setting -jN in TEST_PHP_ARGS:

make TEST_PHP_ARGS=-j4 test

Shall run make test with a maximum of 4 concurrent jobs: Generally the maximum number of jobs should not exceed the number of cores available.

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 super user permissions.

PHP extensions

Extensions provide additional functionality on top of PHP. PHP consists of many essential bundled extensions. Additional extensions can be found in the 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:

Credits

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

More Repositories

1

php-langspec

PHP Language Specification
PHP
2,289
star
2

web-php

The www.php.net site
PHP
778
star
3

doc-en

English PHP documentation
XML
498
star
4

doc-base

Tools for the PHP documentation
PHP
321
star
5

php-rfcs

Experimental repo for GitHub based RFC workflow. For now, please don't submit PRs.
294
star
6

php-gtk-src

The PHP GTK Bindings
C++
201
star
7

pie

The PHP Installer for Extensions
PHP
158
star
8

doc-zh

Chinese translation of the PHP documentation
130
star
9

pecl-php-operator

Operator overloading for Objects
C
124
star
10

doc-pt_br

Brazilian Portuguese translation of the PHP documentation
XML
98
star
11

php-sdk-binary-tools

Tool kit for building PHP under Windows
M4
82
star
12

phd

PHD
PHP
68
star
13

web-qa

The PHP QA Website
PHP
68
star
14

pecl-file_formats-yaml

YAML-1.1 parser and emitter
C
67
star
15

doc-ja

Japanese translation of the PHP documentation
HTML
67
star
16

pecl-search_engine-solr

The Apache Solr PHP extension is an extremely fast, light-weight, feature-rich library that allows PHP applications to communicate easily and efficiently with Apache Solr server instances using an object-oriented API.
C
61
star
17

web-bugs

The PHP Bugtracking System
PHP
58
star
18

pecl-php-uploadprogress

An extension to track progress of a file upload
C
54
star
19

pecl-networking-ssh2

Bindings for the libssh2 library
C
51
star
20

doc-ru

Russian translation of the PHP documentation
XML
48
star
21

presentations

PHP presentations
HTML
45
star
22

web-doc-editor

The PHP Documentation Editor
JavaScript
43
star
23

systems

Hooks and Cronjobs for PHP Infrastructure
C
41
star
24

pecl-networking-uuid

UUID extension
C
35
star
25

web-wiki

The PHP Wiki Systems
PHP
35
star
26

doc-fr

French translation of the PHP documentation
HTML
34
star
27

pecl-networking-gearman

PHP wrapper to libgearman
C
32
star
28

web-doc

PHP
32
star
29

web-php-distributions

All released PHP distributions
PHP
28
star
30

php-tasks

Tasks that need doing. This is for php-src maintainers. The end-user bug tracker is at https://bugs.php.net/.
28
star
31

pecl-mail-mailparse

Email message manipulation
C
27
star
32

php-windows-builder

Tooling to build PHP and extensions on Windows
PowerShell
27
star
33

pecl-system-yaf

PHP Framework in PHP extension
C
26
star
34

pecl-database-mysql

Legacy MySQL extension
PHP
25
star
35

web-pecl

The PECL website
PHP
24
star
36

web-master

The user management system
PHP
23
star
37

web-windows

PHP
22
star
38

doc-de

German translation of the PHP documentation
XML
21
star
39

pecl-languages-v8js

V8 Javascript Engine for PHP
C++
21
star
40

pecl-system-dio

Direct I/O functions
C
21
star
41

pecl-tools-stomp

Stomp Client Extension
C
20
star
42

web-pres2

PHP presentation system
PHP
19
star
43

web-gtk

The PHP GTK site
HTML
18
star
44

doc-es

Spanish translation of the PHP documentation
18
star
45

pecl-database-ibm_db2

Extension for IBM DB2 Universal Database, IBM Cloudscape, and Apache Derby
PHP
18
star
46

pecl-database-mysql_xdevapi

PECL MySQL X DevAPI
C++
17
star
47

pecl-caching-apc

Alternative PHP Cache
PHP
17
star
48

pecl-http-pecl_http

Extended HTTP Support
17
star
49

pecl-system-sync

Synchronization objects
C
16
star
50

pecl-numbers-bitset

C
16
star
51

pecl-event-libevent

Libevent - event notification
C
15
star
52

pecl-php-runkit

PECL Runkit Extension
15
star
53

pecl-database-pdo_ibm

PDO driver for IBM databases
PHP
15
star
54

web-gcov

The PHP GCOV system
PHP
15
star
55

pecl-encryption-mcrypt

Interface to the mcrypt library
PHP
14
star
56

doc-tr

Turkish translation of the PHP documentation
14
star
57

web-shared

Shared code across various .php.net sites
CSS
14
star
58

pecl-php-parsekit

PHP Opcode Analyser
C
14
star
59

web-people

The PHP people system
PHP
14
star
60

web-rmtools

The PHP release management tools
PHP
13
star
61

karma

The Karma Stuff
PHP
12
star
62

pecl-text-xdiff

File differences/patches.
C
12
star
63

pecl-search_engine-sphinx

Client extension for Sphinx - opensource SQL full-text search engine
C
12
star
64

pecl-php-ffi

Foreign Function Interface
C
11
star
65

pecl-caching-memcache

memcached extension
C
10
star
66

web-news

The mailinglist frontend
PHP
10
star
67

pecl-authentication-krb5

PECL krb5 extension
C
10
star
68

doc-it

Italian translation of the PHP documentation
HTML
10
star
69

pftt2

A test tool for the PHP ecosystem designed for convenience, thoroughness and speed.
Java
10
star
70

.github

Github organization configuration
10
star
71

pecl-datetime-timezonedb

Timezone Database to be used with PHP's date and time functions
C
10
star
72

pecl-web_services-oauth

oauth consumer extension
C
9
star
73

doc-uk

Ukrainian translation of the PHP documentation
9
star
74

php-svn-helpers

Helper scripts to checkout the php-src repository from github.
Shell
9
star
75

pecl-networking-mqseries

MQseries client library
C
9
star
76

pecl-php-blenc

BLowfish ENCryption for PHP Scripts
C
9
star
77

pecl-security-selinux

SELinux binding for PHP script language
C
7
star
78

pecl-text-ssdeep

PECL ssdeep Fuzzy Hashing extension
C
7
star
79

pecl-networking-geoip

Map IP address to geographic places
C
7
star
80

pecl-networking-xmlrpc

XML-RPC server and client bindings
C
7
star
81

pecl-tools-fann

PECL fann - Artificial neural networks
C
6
star
82

pecl-math-trader

Technical Analysis for traders.
C
6
star
83

pecl-database-pdo_user

Userspace driver for PDO
C
6
star
84

playground

Git testing playground
PHP
6
star
85

pecl-database-dbase

dBase database file access functions
PHP
6
star
86

php-fuzzing-sapi

PHP Fuzzing SAPI
C
5
star
87

pecl-caching-wincache

Windows Cache Extension for PHP
C
5
star
88

pecl-file_formats-rar

rar extension
C++
5
star
89

doc-pl

Polish translation of the PHP documentation
HTML
4
star
90

benchmarking-data

4
star
91

pecl-database-pq

PECL pq extension
4
star
92

pecl-xml-xmldiff

XML diff and merge
C++
4
star
93

pecl-text-wddx

WDDX data exchange format
PHP
4
star
94

pecl-php-raphf

PECL raphf extension
4
star
95

pecl-database-pdo_informix

PDO driver for IBM Informix INFORMIX databases
C
4
star
96

pecl-php-memtrack

PHP extension to watch (unusually high) memory consumption in PHP scripts
C
4
star
97

pecl-internationalization-fribidi

Implementation of the Unicode BiDi algorithm
C
4
star
98

pecl-file_formats-lzf

LZF compression
C
3
star
99

pecl-database-interbase

InterBase/FireBird extension
C
3
star
100

pecl-multimedia-xmp

xmp module file
C
3
star