Skip to content

Commit be9a6b2

Browse files
committed
Merge pull request #2 from php/master
sync from php/php-src
2 parents 627ccc3 + 719083b commit be9a6b2

4,446 files changed

Lines changed: 502773 additions & 312179 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gdbinit

Lines changed: 208 additions & 212 deletions
Large diffs are not rendered by default.

.gitattributes

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,13 @@ sapi/nsapi/nsapi.c ident
2222
sapi/continuity/capi.c ident
2323
Zend/RFCs/002.txt ident
2424
Zend/RFCs/003.txt ident
25+
ext/exif/exif.c ident
26+
ext/ldap/ldap.c ident
27+
ext/pdo_pgsql/pdo_pgsql.c ident
28+
ext/tidy/tidy.c ident
2529
NEWS merge=NEWS
30+
UPGRADING merge=NEWS
31+
UPGRADING.INTERNALS merge=NEWS
2632
/ext/bz2/tests/with_strings.phpt -crlf
2733
/ext/dom/tests/bug40836.phpt -crlf
2834
/ext/dom/tests/domelement.phpt -crlf

.gitignore

Lines changed: 36 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
*.gcno
1010
*.la
1111
*.lo
12+
*.loT
1213
*.o
1314
*.a
1415
*.ncb
@@ -19,6 +20,7 @@
1920
*.tgz
2021
*.tar.gz
2122
*.tar.bz2
23+
*.tar.xz
2224
.FBCIndex
2325
.FBCLockFolder
2426
.deps
@@ -81,7 +83,7 @@ mkinstalldirs
8183
modules
8284
php
8385
php-*.tar.gz
84-
php5.spec
86+
php7.spec
8587
php_lcov.info
8688
php_test_results_*.txt
8789
php_version.h
@@ -117,6 +119,12 @@ tests/*/*.php
117119
tests/*/*.exp
118120
tests/*/*.log
119121
tests/*/*.sh
122+
tests/*/*/*.diff
123+
tests/*/*/*.out
124+
tests/*/*/*.php
125+
tests/*/*/*.exp
126+
tests/*/*/*.log
127+
tests/*/*/*.sh
120128
*/tests/*.diff
121129
*/tests/*.out
122130
*/tests/*.php
@@ -129,6 +137,12 @@ tests/*/*.sh
129137
*/tests/*/*.exp
130138
*/tests/*/*.log
131139
*/tests/*/*.sh
140+
*/tests/*/*/*.diff
141+
*/tests/*/*/*.out
142+
*/tests/*/*/*.php
143+
*/tests/*/*/*.exp
144+
*/tests/*/*/*.log
145+
*/tests/*/*/*.sh
132146
*/*/tests/*.diff
133147
*/*/tests/*.out
134148
*/*/tests/*.php
@@ -141,6 +155,18 @@ tests/*/*.sh
141155
*/*/tests/*/*.exp
142156
*/*/tests/*/*.log
143157
*/*/tests/*/*.sh
158+
*/*/tests/*/*/*.diff
159+
*/*/tests/*/*/*.out
160+
*/*/tests/*/*/*.php
161+
*/*/tests/*/*/*.exp
162+
*/*/tests/*/*/*.log
163+
*/*/tests/*/*/*.sh
164+
*/*/tests/*/*/*/*.diff
165+
*/*/tests/*/*/*/*.out
166+
*/*/tests/*/*/*/*.php
167+
*/*/tests/*/*/*/*.exp
168+
*/*/tests/*/*/*/*.log
169+
*/*/tests/*/*/*/*.sh
144170

145171
# Extension specifc ignores
146172
ext/*/configure.in
@@ -206,6 +232,8 @@ ext/pdo_sqlite/sqlite3.h
206232
ext/pdo_sqlite/tests/*.db
207233
ext/pdo_sqlite/tests/*.tmp
208234
ext/phar/phar.phar
235+
ext/phar/phar.1
236+
ext/phar/phar.phar.1
209237
ext/pspell/tests/*.tmp
210238
ext/reflection/xml
211239
ext/reflection/html
@@ -233,16 +261,20 @@ pear/phpize
233261
pear/run-tests
234262
pear/php-config
235263
pear/scripts
236-
sapi/apache/libphp5.module
237-
sapi/apache2handler/libphp5.module
238-
sapi/apache_hooks/libphp5.module
264+
sapi/apache/libphp7.module
265+
sapi/apache2handler/libphp7.module
266+
sapi/apache_hooks/libphp7.module
239267
sapi/cgi/php-cgi
268+
sapi/cgi/php-cgi.1
240269
sapi/cli/php.1
241270
sapi/fpm/php-fpm
242271
sapi/fpm/php-fpm.1
243272
sapi/fpm/init.d.php-fpm
244273
sapi/fpm/php-fpm.conf
245274
sapi/fpm/fpm/php-cgi
275+
sapi/phpdbg/phpdbg_parser.c
276+
sapi/phpdbg/phpdbg_parser.h
277+
sapi/phpdbg/phpdbg
246278
scripts/php-config
247279
scripts/phpize
248280
scripts/man1/*.1

.travis.yml

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,35 @@ php:
44
# We only specify one version so we only get one worker
55
- 5.4
66

7+
branches:
8+
except:
9+
- phpng
10+
711
notifications:
8-
email: false
12+
email:
13+
on_failure: change
14+
15+
cache:
16+
- apt
917

1018
env:
11-
- REPORT_EXIT_STATUS=1 TEST_PHP_EXECUTABLE=./sapi/cli/php
19+
global:
20+
- MYSQL_TEST_HOST=127.0.0.1
21+
- MYSQL_TEST_USER=travis
22+
- PDO_MYSQL_TEST_DSN="mysql:host=127.0.0.1;dbname=test"
23+
- PDO_MYSQL_TEST_USER=travis
24+
- PDO_MYSQL_TEST_PASS=
25+
- PDO_MYSQL_TEST_HOST=127.0.0.1
26+
- REPORT_EXIT_STATUS=1
27+
matrix:
28+
- ENABLE_MAINTAINER_ZTS=0 ENABLE_DEBUG=0
29+
- ENABLE_MAINTAINER_ZTS=1 ENABLE_DEBUG=1
30+
31+
before_install:
32+
- sudo apt-get update -qq
33+
- sudo apt-get install -y libenchant-dev libaspell-dev libpspell-dev librecode-dev
34+
- sudo cp ./travis/de /var/lib/locales/supported.d/de
35+
- sudo dpkg-reconfigure locales
1236

1337
before_script:
1438
# Compile PHP
@@ -21,4 +45,6 @@ before_script:
2145
- . ./travis/ext/pdo_pgsql/setup.sh
2246

2347
# Run PHPs run-tests.php
24-
script: ./sapi/cli/php run-tests.php -g "FAIL,XFAIL,BORK,WARN,LEAK,SKIP"
48+
script:
49+
- ./sapi/cli/php run-tests.php -p `pwd`/sapi/cli/php -g "FAIL,XFAIL,BORK,WARN,LEAK,SKIP" --show-diff --set-timeout 120 -s
50+
- ./sapi/cli/php sapi/phpdbg/tests/run-tests.php -diff2stdout --phpdbg sapi/phpdbg/phpdbg

CODING_STANDARDS

Lines changed: 31 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ Exceptions:
4242

4343
4. When writing functions that deal with strings, be sure to remember
4444
that PHP holds the length property of each string, and that it
45-
shouldn't be calculated with strlen(). Write your functions in a such
45+
shouldn't be calculated with strlen(). Write your functions in such
4646
a way so that they'll take advantage of the length property, both
4747
for efficiency and in order for them to be binary-safe.
4848
Functions that change strings and obtain their new lengths while
@@ -59,8 +59,8 @@ Exceptions:
5959
you're calling.
6060

6161
7. When commenting out code using a #if statement, do NOT use 0 only. Instead
62-
use "<svn username here>_0". For example, #if FOO_0, where FOO is your
63-
svn user foo. This allows easier tracking of why code was commented out,
62+
use "<git username here>_0". For example, #if FOO_0, where FOO is your
63+
git user foo. This allows easier tracking of why code was commented out,
6464
especially in bundled libraries.
6565

6666
8. Do not define functions that are not available. For instance, if a
@@ -82,7 +82,7 @@ Exceptions:
8282
library may need to control or free the memory, or when the memory in
8383
question needs to survive between multiple requests.
8484

85-
Naming Conventions
85+
User Functions/Methods Naming Conventions
8686
------------------
8787

8888
1. Function names for user-level functions should be enclosed with in
@@ -151,7 +151,7 @@ Naming Conventions
151151

152152
7. Classes should be given descriptive names. Avoid using abbreviations where
153153
possible. Each word in the class name should start with a capital letter,
154-
without underscore delimiters (CampelCaps starting with a capital letter).
154+
without underscore delimiters (CamelCaps starting with a capital letter).
155155
The class name should be prefixed with the name of the 'parent set' (e.g.
156156
the name of the extension)::
157157

@@ -163,6 +163,26 @@ Naming Conventions
163163
'foobar'
164164
'foo_bar'
165165

166+
Internal Function Naming Convensions
167+
----------------------
168+
169+
1. Functions that are part of the external API should be named
170+
'php_modulename_function()' to avoid symbol collision. They should be in
171+
lowercase, with words underscore delimited. Exposed API must be defined
172+
in 'php_modulename.h'.
173+
174+
PHPAPI char *php_session_create_id(PS_CREATE_SID_ARGS);
175+
176+
Unexposed module function should be static and should not be defined in
177+
'php_modulename.h'.
178+
179+
static int php_session_destroy(TSRMLS_D)
180+
181+
2. Main module source file must be named 'modulename.c'.
182+
183+
3. Header file that is used by other sources must be named 'php_modulename.h'.
184+
185+
166186
Syntax and indentation
167187
----------------------
168188

@@ -181,9 +201,9 @@ Syntax and indentation
181201
of PHP or one of its standard modules, please maintain the K&R
182202
style. This applies to just about everything, starting with
183203
indentation and comment styles and up to function declaration
184-
syntax. Also see Indentstyle_.
204+
syntax. Also see Indentstyle.
185205

186-
.. _Indentstyle: http://www.catb.org/~esr/jargon/html/I/indent-style.html
206+
Indentstyle: http://www.catb.org/~esr/jargon/html/I/indent-style.html
187207

188208
3. Be generous with whitespace and braces. Keep one empty line between the
189209
variable declaration section and the statements in a block, as well as
@@ -259,7 +279,10 @@ The file labelled 'EXPERIMENTAL' should include the following
259279
information::
260280

261281
Any authoring information (known bugs, future directions of the module).
262-
Ongoing status notes which may not be appropriate for SVN comments.
282+
Ongoing status notes which may not be appropriate for Git comments.
283+
284+
In general new features should go to PECL or experimental branches until
285+
there are specific reasons for directly adding it to the core distribution.
263286

264287
Aliases & Legacy Documentation
265288
-----------------------------------

EXTENSIONS

Lines changed: 12 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ STATUS: Working
147147
COMMENT: Tested on phpts and isapi versions
148148
-------------------------------------------------------------------------------
149149
EXTENSION: mysql
150-
PRIMARY MAINTAINER: Zak Greant <zak@mysql.com>, Georg Richter <georg@php.net>, Johannes Schl�ter <johannes@php.net>, Ulf Wendel <uw@php.net>
150+
PRIMARY MAINTAINER: Zak Greant <zak@mysql.com>, Georg Richter <georg@php.net>, Andrey Hristov <andrey@php.net>, Johannes Schl�ter <johannes@php.net>, Ulf Wendel <uw@php.net>
151151
MAINTENANCE: Maintained
152152
STATUS: Working
153153
-------------------------------------------------------------------------------
@@ -158,7 +158,7 @@ STATUS: Working
158158
SINCE: 5.0
159159
-------------------------------------------------------------------------------
160160
EXTENSION: mysqlnd
161-
PRIMARY MAINTAINER: Georg Richter <georg@php.net>, Andrey Hristov <andrey@php.net>, Johannes Schl�ter <johannes@php.net>, Ulf Wendel <uw@php.net>
161+
PRIMARY MAINTAINER: Andrey Hristov <andrey@php.net>, Johannes Schl�ter <johannes@php.net>, Ulf Wendel <uw@php.net>
162162
MAINTENANCE: Maintained
163163
STATUS: Working
164164
SINCE: 5.3
@@ -228,13 +228,6 @@ MAINTENANCE: Maintained
228228
STATUS: Working
229229
COMMENT: Use PostgreSQL 7.0.x or later. PostgreSQL 6.5.3 or less have fatal bug.
230230
-------------------------------------------------------------------------------
231-
EXTENSION: sqlite
232-
PRIMARY MAINTAINER: Marcus Boerger <helly@php.net>, Wez Furlong <wez@php.net>, Ilia Alshanetsky <iliaa@php.net>
233-
MAINTENANCE: Maintained
234-
STATUS: Working
235-
SINCE: 5.0 (Since 4.3.2 in PECL)
236-
COMMENT: Integrates SQLite 2 embeddable SQL database engine.
237-
-------------------------------------------------------------------------------
238231
EXTENSION: sqlite3
239232
PRIMARY MAINTAINER: Scott MacVicar <scottmac@php.net>
240233
MAINTENANCE: Maintained
@@ -385,6 +378,12 @@ MAINTENANCE: Maintained
385378
STATUS: Working
386379
SINCE: 4.0.4
387380
-------------------------------------------------------------------------------
381+
EXTENSION: hash
382+
PRIMARY MAINTAINER: Sara Golemon <pollita@php.net>, Mike Wallner <mike@php.net>, Anatol Belski <ab@php.net>
383+
MAINTENANCE: Maintained
384+
STATUS: Working
385+
SINCE: 5.1.2
386+
-------------------------------------------------------------------------------
388387
EXTENSION: iconv
389388
PRIMARY MAINTAINER: Moriyoshi Koizumi <moriyoshi@php.net>
390389
MAINTENANCE: Maintained
@@ -422,21 +421,11 @@ PRIMARY MAINTAINER: Derick Rethans <derick@derickrethans.nl>
422421
MAINTENANCE: Maintained
423422
STATUS: Working
424423
-------------------------------------------------------------------------------
425-
EXTENSION: mhash
426-
PRIMARY MAINTAINER: Sascha Schumann <sascha@schumann.cx>, Scott MacVicar <scottmac@php.net>
427-
MAINTENANCE: Unknown
424+
EXTENSION: opcache
425+
PRIMARY MAINTAINER: Dmitry Stogov <dmitry@zend.com>, Xinchen Hui <laruence@php.net>
426+
MAINTENANCE: Maintained
428427
STATUS: Working
429-
-------------------------------------------------------------------------------
430-
EXTENSION: mime_magic
431-
PRIMARY MAINTAINER: Unknown
432-
MAINTENANCE: Deprecated
433-
STATUS: Experimental
434-
COMMENT: Use the fileinfo extension instead
435-
-------------------------------------------------------------------------------
436-
EXTENSION: ming
437-
PRIMARY MAINTAINER: Frank M. Kromann
438-
MAINTENANCE: Unknown
439-
STATUS: Experimental
428+
SINCE: 5.5.0
440429
-------------------------------------------------------------------------------
441430
EXTENSION: openssl
442431
PRIMARY MAINTAINER: Wez Furlong <wez@php.net>, Pierre-Alain Joye <pajoye@php.net>

0 commit comments

Comments
 (0)