Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: php/php-src
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: php-7.4.33
Choose a base ref
...
head repository: php/php-src
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: php-8.0.0
Choose a head ref

Commits on Jan 28, 2019

  1. Copy the full SHA
    e118151 View commit details
  2. Upgrade branches in GIT-RULES

    nikic committed Jan 28, 2019
    Copy the full SHA
    e916a23 View commit details
  3. Bump API numbers

    These are of course not the final API numbers, but let's make sure
    they differ from the 7.4 branch for now.
    nikic committed Jan 28, 2019
    Copy the full SHA
    3c2e1b6 View commit details
  4. Merge branch 'PHP-7.4'

    nikic committed Jan 28, 2019
    Copy the full SHA
    a9a02ca View commit details
  5. Copy the full SHA
    dfa6c20 View commit details
  6. Copy the full SHA
    e973663 View commit details
  7. Copy the full SHA
    3d15a6f View commit details
  8. Copy the full SHA
    faf03e4 View commit details
  9. Remove deprecated gmp_random() function

    Deprecated in PHP 7.2 as part of
    https://wiki.php.net/rfc/deprecations_php_7_2.
    nikic committed Jan 28, 2019
    Copy the full SHA
    734c305 View commit details
  10. Remove create_function()

    Deprecated in PHP 7.2 as part of
    https://wiki.php.net/rfc/deprecations_php_7_2.
    nikic committed Jan 28, 2019
    Copy the full SHA
    ee16d99 View commit details
  11. Remove track_errors and $php_errormsg

    This has been deprecated in PHP 7.2 as part of
    https://wiki.php.net/rfc/deprecations_php_7_2.
    nikic committed Jan 28, 2019
    Copy the full SHA
    920b4b2 View commit details
  12. Remove mbstring.func_overload

    Deprecated in PHP 7.2 as part of
    https://wiki.php.net/rfc/deprecations_php_7_2.
    nikic committed Jan 28, 2019
    Copy the full SHA
    331e56c View commit details
  13. Require second argument on (mb_)parse_str()

    This was deprecated in PHP 7.2 as part of
    https://wiki.php.net/rfc/deprecations_php_7_2.
    nikic committed Jan 28, 2019
    Copy the full SHA
    ff780fe View commit details
  14. Copy the full SHA
    97df99a View commit details
  15. Copy the full SHA
    eeb7511 View commit details

Commits on Jan 29, 2019

  1. Merge branch 'PHP-7.4'

    nikic committed Jan 29, 2019
    Copy the full SHA
    46d38aa View commit details
  2. Remove special treatment of strings in asserts

    This was deprecated in PHP 7.2 as part of
    https://wiki.php.net/rfc/deprecations_php_7_2.
    nikic committed Jan 29, 2019
    Copy the full SHA
    9bc2cac View commit details
  3. Remove each()

    This has been deprecated in PHP 7.2 as part of
    https://wiki.php.net/rfc/deprecations_php_7_2.
    nikic committed Jan 29, 2019
    Copy the full SHA
    6db97f5 View commit details
  4. Remove deprecated mbregex aliases

    These have been deprecated in PHP 7.3 as part of
    https://wiki.php.net/rfc/deprecations_php_7_3.
    nikic committed Jan 29, 2019
    Copy the full SHA
    83bc092 View commit details
  5. Remove fgetss and friends

    These were deprecated in PHP 7.3 as part of
    https://wiki.php.net/rfc/deprecations_php_7_3.
    nikic committed Jan 29, 2019
    Copy the full SHA
    c7d7af8 View commit details
  6. Copy the full SHA
    c97b9aa View commit details
  7. Remove (unset) cast

    Deprecated in PHP 7.2 as part of
    https://wiki.php.net/rfc/deprecations_php_7_2.
    nikic committed Jan 29, 2019
    Copy the full SHA
    d74d392 View commit details
  8. Remove FILTER_FLAG_(SCHEME|HOST)_REQUIRED

    Deprecated in PHP 7.3 as part of
    https://wiki.php.net/rfc/deprecations_php_7_3.
    nikic committed Jan 29, 2019
    Copy the full SHA
    6b89dbc View commit details
  9. Remove support for custom assert() function

    Deprecated in PHP 7.3 as part of
    https://wiki.php.net/rfc/deprecations_php_7_3.
    nikic committed Jan 29, 2019
    Copy the full SHA
    55dbb57 View commit details
  10. Copy the full SHA
    371e427 View commit details
  11. Copy the full SHA
    4d8dc2b View commit details
  12. Remove support for legacy constructors

    This has been deprecated in PHP 7.0 by
    https://wiki.php.net/rfc/remove_php4_constructors.
    nikic committed Jan 29, 2019
    Copy the full SHA
    682b54f View commit details
  13. Copy the full SHA
    52a9325 View commit details

Commits on Jan 30, 2019

  1. Merge branch 'PHP-7.4'

    * PHP-7.4:
      Prepare main branch for PHP 7.2.16
    cmb69 committed Jan 30, 2019
    Copy the full SHA
    90bb326 View commit details
  2. Remove ability to declare userland case-insensitive constants

    This is part of https://wiki.php.net/rfc/case_insensitive_constant_deprecation.
    
    This commit only removes the ability to declare such constants from
    userland. Before the functionality can be removed entirely, it's
    necessary to figure out the handling of true/false/null first.
    nikic committed Jan 30, 2019
    Copy the full SHA
    23a5be3 View commit details
  3. Copy the full SHA
    4eb5db2 View commit details
  4. Copy the full SHA
    6c73b50 View commit details
  5. Copy the full SHA
    38c337f View commit details
  6. Copy the full SHA
    02557f8 View commit details
  7. Copy the full SHA
    91a7c6f View commit details
  8. Merge branch 'PHP-7.4'

    nikic committed Jan 30, 2019
    Copy the full SHA
    d46ba96 View commit details
  9. Merge branch 'PHP-7.4'

    nikic committed Jan 30, 2019
    Copy the full SHA
    1870283 View commit details
  10. Copy the full SHA
    94ae35c View commit details
  11. Copy the full SHA
    5a2787a View commit details
  12. Removed read_exif_data() alias

    nikic committed Jan 30, 2019
    Copy the full SHA
    c88e2cc View commit details
  13. Remove more leftovers from invalid static calls

    Callbacks are now always valid or not valid, there is no in-between.
    nikic committed Jan 30, 2019
    Copy the full SHA
    e93bbf4 View commit details
  14. Remove support for __autoload()

    There are probably some improvements we can do to the SPL
    implementation now that __autoload() is gone. In particular having
    EG(autoload_func) as a property zend function, rather than a simple
    callback probably doesn't make sense.
    nikic committed Jan 30, 2019
    Copy the full SHA
    0dfd918 View commit details
  15. Copy the full SHA
    db8a4e8 View commit details
  16. Remove intl Normalizer::NONE

    nikic committed Jan 30, 2019
    Copy the full SHA
    f8038f8 View commit details
  17. Remove -1 crop mode

    nikic committed Jan 30, 2019
    Copy the full SHA
    e18fde1 View commit details
  18. Merge branch 'PHP-7.3'

    * PHP-7.3:
      Fix #77546 iptcembed broken function
    krakjoe committed Jan 30, 2019
    Copy the full SHA
    ffbe008 View commit details
  19. Merge branch 'PHP-7.4'

    * PHP-7.4:
      Fix bug 76596: phpdbg supports display_errors=stderr
    krakjoe committed Jan 30, 2019
    Copy the full SHA
    cc60e8b View commit details

Commits on Jan 31, 2019

  1. Copy the full SHA
    4e0dd6b View commit details
  2. Merge branch 'PHP-7.4'

    * PHP-7.4:
      Don't silence fatal errors with @
    krakjoe committed Jan 31, 2019
    Copy the full SHA
    839bdf1 View commit details
  3. Merge branch 'PHP-7.4'

    nikic committed Jan 31, 2019
    Copy the full SHA
    9c5ab99 View commit details
Showing 13,891 changed files with 484,176 additions and 399,692 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
4 changes: 2 additions & 2 deletions .appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
version: "{branch}.build.{build}"

image: Visual Studio 2017
image: Visual Studio 2019

branches:
except:
@@ -24,7 +24,7 @@ environment:
PHP_BUILD_OBJ_DIR: c:\obj
PHP_BUILD_CACHE_SDK_DIR: c:\build-cache\sdk
PHP_BUILD_SDK_BRANCH: php-sdk-2.2.0
PHP_BUILD_CRT: vc15
PHP_BUILD_CRT: vs16
# ext and env setup for tests
#MYSQL_TEST_PASSWD: Password12!
#MYSQL_TEST_USER: root
18 changes: 3 additions & 15 deletions .gdbinit
Original file line number Diff line number Diff line change
@@ -252,16 +252,13 @@ define ____printzv_contents
____printzv &$zvalue->value.ref->val $arg1
end
if $type == 11
printf "const: %s", $zvalue->value.str->val
end
if $type == 12
printf "CONSTANT_AST"
end
if $type == 13
if $type == 12
printf "indirect: "
____printzv $zvalue->value.zv $arg1
end
if $type == 14
if $type == 13
printf "pointer: %p", $zvalue->value.ptr
end
if $type == 15
@@ -271,18 +268,9 @@ define ____printzv_contents
printf "_BOOL"
end
if $type == 17
printf "CALLABLE"
end
if $type == 18
printf "ITERABLE"
end
if $type == 19
printf "VOID"
end
if $type == 20
printf "_NUMBER"
end
if $type > 20
if $type > 17
printf "unknown type %d", $type
end
printf "\n"
30 changes: 16 additions & 14 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -80,22 +80,15 @@ include/
libs/
modules/

# Used by build/gen_stub.php
build/PHP-Parser-*

# ------------------------------------------------------------------------------
# Configuration headers generated by the PHP build system
# ------------------------------------------------------------------------------
config.h
config.h.in
/ext/date/lib/timelib_config.h
/ext/iconv/php_have_bsd_iconv.h
/ext/iconv/php_have_glibc_iconv.h
/ext/iconv/php_have_ibm_iconv.h
/ext/iconv/php_have_iconv.h
/ext/iconv/php_have_libiconv.h
/ext/iconv/php_iconv_aliased_libiconv.h
/ext/iconv/php_iconv_broken_ignore.h
/ext/iconv/php_iconv_supports_errno.h
/ext/iconv/php_php_iconv_h_path.h
/ext/iconv/php_php_iconv_impl.h
/main/build-defs.h
/main/php_config.h.in
/main/php_config.h
@@ -116,7 +109,7 @@ config.h.in
# ------------------------------------------------------------------------------
# SAPIs specific ignores
# ------------------------------------------------------------------------------
/sapi/apache2handler/libphp7.module
/sapi/apache2handler/libphp.module
/sapi/fpm/fpm/php-cgi
/sapi/fpm/init.d.php-fpm
/sapi/fpm/php-fpm.conf
@@ -168,8 +161,14 @@ php
/Zend/zend_language_parser.output

# ------------------------------------------------------------------------------
# Extensions files additionally generated by `cd ext/name && phpize && ./configure`
# Extensions files
# ------------------------------------------------------------------------------

# Miscellaneous extensions files
/ext/opcache/jit/zend_jit_x86.c
/ext/opcache/minilua

# Generated by `cd ext/name && phpize && ./configure`
/ext/*/build/
/ext/*/configure.ac
/ext/*/run-tests.php
@@ -182,7 +181,7 @@ php
/configure.bat
/configure.js

# Generated by `/configure.(bat|js)` (architecture dependend)
# Generated by `/configure.(bat|js)` (architecture dependent)
/config.nice.bat

# NTS debug build x86
@@ -200,7 +199,7 @@ php
# Generated by x64 compiler, includes Debug, Debug_TS, Release, Release_TS
/x64/

# Miscellaneous files generated by Windows build sytem
# Miscellaneous files generated by Windows build system
/main/config.w32.h
/win32/build/deplister.exe
/win32/build/deplister.obj
@@ -238,6 +237,9 @@ php
# Test results generated by `./run-tests.php`
php_test_results_*.txt

# Temporary test information generated by `./run-tests.php`
/run-test-info.php

# Temporary POST data placeholder files generated by `./run-tests.php`
phpt.*

16 changes: 10 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
git:
quiet: true

dist: xenial
dist: bionic
language: c
sudo: required
os: linux
addons:
apt:
packages:
@@ -68,12 +68,16 @@ env:

jobs:
include:
- env: ENABLE_MAINTAINER_ZTS=0 ENABLE_DEBUG=0
- env: ENABLE_ZTS=0 ENABLE_DEBUG=0
arch: amd64
- env: ENABLE_MAINTAINER_ZTS=1 ENABLE_DEBUG=1
- env: ENABLE_ZTS=1 ENABLE_DEBUG=1
arch: amd64
- env: ENABLE_MAINTAINER_ZTS=1 ENABLE_DEBUG=1 SKIP_IO_CAPTURE_TESTS=1 ARM64=1
- env: ENABLE_ZTS=1 ENABLE_DEBUG=1 SKIP_IO_CAPTURE_TESTS=1 ARM64=1
arch: arm64
if: type = cron
- env: ENABLE_ZTS=1 ENABLE_DEBUG=1 SKIP_IO_CAPTURE_TESTS=1 S390X=1
arch: s390x
if: type = cron

before_script:
- ccache --version
@@ -91,7 +95,7 @@ before_script:
script:
# ARM64 CI reports nproc=32, which is excessive.
- if [ -z "$ARM64" ]; then export JOBS=$(nproc); else export JOBS=16; fi
- ./sapi/cli/php run-tests.php -P -d extension=`pwd`/modules/zend_test.so $(if [ $ENABLE_DEBUG == 0 ]; then echo "-d opcache.enable_cli=1 -d opcache.protect_memory=1 -d zend_extension=`pwd`/modules/opcache.so"; fi) -g "FAIL,XFAIL,BORK,WARN,LEAK,SKIP" --offline --show-diff --show-slow 1000 --set-timeout 120 -j$JOBS
- ./sapi/cli/php run-tests.php -P -d extension=`pwd`/modules/zend_test.so $(if [ $ENABLE_DEBUG == 0 ]; then echo "-d opcache.enable_cli=1 -d opcache.protect_memory=1 -d opcache.jit_buffer_size=16M -d zend_extension=`pwd`/modules/opcache.so"; fi) -g "FAIL,XFAIL,BORK,WARN,LEAK,SKIP" --offline --show-diff --show-slow 1000 --set-timeout 120 -j$JOBS
- sapi/cli/php -d extension_dir=`pwd`/modules -r 'dl("zend_test");'

after_success:
38 changes: 8 additions & 30 deletions CODING_STANDARDS.md
Original file line number Diff line number Diff line change
@@ -272,44 +272,23 @@ use these rules.
1. Extensions should be well tested using `*.phpt` tests. Read about that at
[qa.php.net](https://qa.php.net/write-test.php) documentation.

## Documentation and folding hooks
## Folding hooks

In order to make sure that the online documentation stays in line with the code,
each user-level function should have its user-level function prototype before it
along with a brief one-line description of what the function does. It would look
like this:
Use `{{{` symbols for the folding mode in Emacs and vim (`set fdm=marker`).
Folding is very useful when dealing with large files because you can scroll
through the file quickly and just unfold the function you wish to work on.
The `}}}` at the end of each function marks the end of the fold, and should
be on a separate line.

```c
/* {{{ proto int abs(int number)
Returns the absolute value of the number */
/* {{{ Returns the absolute value of the number */
PHP_FUNCTION(abs)
{
...
}
/* }}} */
```

The `{{{` symbols are the default folding symbols for the folding mode in Emacs
and vim (`set fdm=marker`). Folding is very useful when dealing with large files
because you can scroll through the file quickly and just unfold the function you
wish to work on. The `}}}` at the end of each function marks the end of the
fold, and should be on a separate line.

The `proto` keyword there is just a helper for the `doc/genfuncsummary` script
which generates a full function summary. Having this keyword in front of the
function prototypes allows us to put folds elsewhere in the code without
messing up the function summary.

Optional arguments are written like this:

```c
/* {{{ proto object imap_header(int stream_id, int msg_no [, int from_length [, int subject_length [, string default_host]]])
Returns a header object with the defined parameters */
```

And yes, please keep the prototype on a single line, even if that line is
massive.

## New and experimental functions

To reduce the problems normally associated with the first public implementation
@@ -334,8 +313,7 @@ purposes, these will only be documented by the most current name, with the
aliases listed in the documentation for the parent function. For ease of
reference, user-functions with completely different names, that alias to the
same function (such as `highlight_file` and `show_source`), will be separately
documented. The proto should still be included, describing which function is
aliased.
documented.

Backwards compatible functions and names should be maintained as long as the
code can be reasonably be kept as part of the codebase. See the `README` in the
13 changes: 4 additions & 9 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -197,9 +197,6 @@ locations.
└─ tokenizer/
├─ tokenizer_data.c # Generated by `ext/tokenizer/tokenizer_data_gen.sh`
└─ ...
└─ xmlrpc/
├─ libxmlrpc/ # Forked and maintained in php-src
└─ ...
└─ zend_test # For testing internal APIs. Not needed for regular builds.
└─ ...
└─ zip/ # Bundled https://github.com/pierrejoye/php_zip
@@ -262,8 +259,8 @@ included.
- Run `make test` to check your change doesn't break other features.
- Rebuild PHP with `--enable-debug` which will show some kinds of memory errors
and check the PHP and web server error logs after running your PHP tests.
- Rebuild PHP with `--enable-maintainer-zts` to check your change compiles on
multi-threaded web servers.
- Rebuild PHP with `--enable-zts` to check your change compiles and operates
correctly in a thread safe PHP.
- Review the change once more just before submitting it.

## What happens after submitting contribution?
@@ -323,8 +320,8 @@ Having said that, here are the organizational rules:
`make test`.

7. For development use the `--enable-debug` switch to avoid memory leaks and the
`--enable-maintainer-zts` switch to ensure your code handles TSRM correctly
and doesn't break for those who need that.
`--enable-zts` switch to ensure your code handles TSRM correctly and doesn't
break for those who need that.

Currently we have the following branches in use:

@@ -409,8 +406,6 @@ New source code files should include the following header block:

```c
/*
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
| Copyright (c) The PHP Group |
+----------------------------------------------------------------------+
Loading