]> granicus.if.org Git - php/log
php
5 years agoAdd extensions naming conventions to ext_skel.php
Peter Kokot [Sun, 12 May 2019 18:39:42 +0000 (20:39 +0200)]
Add extensions naming conventions to ext_skel.php

- first character is a letter
- followed by any number of letters, numbers, or underscores
- prefferred are lower case letters

5 years agoConvert CRLF to LF
Peter Kokot [Tue, 14 May 2019 00:59:06 +0000 (02:59 +0200)]
Convert CRLF to LF

5 years agoFixed test on platforms that don't support fastcall calling convention
Dmitry Stogov [Mon, 13 May 2019 21:21:00 +0000 (00:21 +0300)]
Fixed test on platforms that don't support fastcall calling convention

5 years agoRemove example file for pgsql extension
Peter Kokot [Mon, 13 May 2019 20:14:58 +0000 (22:14 +0200)]
Remove example file for pgsql extension

This removes the example script in favour of the manual:
https://www.php.net/manual/en/book.pgsql.php

Patch for integrating these functions as an example has been submitted
also to PHP manual via edit.php.net.

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Jakub Zelenka [Mon, 13 May 2019 17:51:41 +0000 (18:51 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

5 years agoMerge branch 'PHP-7.2' into PHP-7.3
Jakub Zelenka [Mon, 13 May 2019 17:51:05 +0000 (18:51 +0100)]
Merge branch 'PHP-7.2' into PHP-7.3

5 years agoAdd ping to the fpm test for bug #77934
Jakub Zelenka [Mon, 13 May 2019 17:47:43 +0000 (18:47 +0100)]
Add ping to the fpm test for bug #77934

5 years agoImplement spread operator in arrays
CHU Zhaowei [Sat, 6 Oct 2018 14:04:41 +0000 (22:04 +0800)]
Implement spread operator in arrays

RFC: https://wiki.php.net/rfc/spread_operator_for_array

Closes GH-3640.

5 years agoCheck for supported libffi ABI
Dmitry Stogov [Mon, 13 May 2019 12:15:51 +0000 (15:15 +0300)]
Check for supported libffi ABI

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Mon, 13 May 2019 11:11:07 +0000 (13:11 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #78003: strip_tags output change since PHP 7.3

5 years agoFix #78003: strip_tags output change since PHP 7.3
Christoph M. Becker [Mon, 13 May 2019 11:10:24 +0000 (13:10 +0200)]
Fix #78003: strip_tags output change since PHP 7.3

A refactoring of the strip tags state machine[1] missed the special
treatment of `depth > 0` when a `>` is encountered in state 2 or 3.  We
re-add it for BC reasons.

[1] <http://git.php.net/?p=php-src.git;a=commit;h=5cf64742773ddbf9af69d962a4d12b567fcf0084>

5 years agoARM64 may be big endian
Dmitry Stogov [Mon, 13 May 2019 10:33:03 +0000 (13:33 +0300)]
ARM64 may be big endian

5 years agoLoad 8 bytes at a time in hash_func. (Sebastian Pop)
Dmitry Stogov [Mon, 13 May 2019 09:34:53 +0000 (12:34 +0300)]
Load 8 bytes at a time in hash_func. (Sebastian Pop)

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Mon, 13 May 2019 09:06:35 +0000 (11:06 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

5 years agoMerge branch 'PHP-7.2' into PHP-7.3
Nikita Popov [Mon, 13 May 2019 09:06:14 +0000 (11:06 +0200)]
Merge branch 'PHP-7.2' into PHP-7.3

5 years agoFix #77993: Wrong parse error for invalid hex literal on Windows
Theodore Brown [Thu, 9 May 2019 19:19:52 +0000 (14:19 -0500)]
Fix #77993: Wrong parse error for invalid hex literal on Windows

If a PHP file contains an invalid hex literal such as `0x_10`, the expected error
is `Parse error: syntax error, unexpected 'x_10' (T_STRING) in %s on line %d`.

This already worked correctly on Linux, but on Windows prior to this patch a different
error was produced: `Parse error: Invalid numeric literal in %s on line %d`.

5 years agoRequire semicolon after SAVE_CURL_ERROR()
GITSRC [Mon, 13 May 2019 08:21:46 +0000 (16:21 +0800)]
Require semicolon after SAVE_CURL_ERROR()

5 years agoSupport content_type stream context option in soap
Vincent JARDIN [Tue, 23 Apr 2019 21:10:38 +0000 (23:10 +0200)]
Support content_type stream context option in soap

Allows overriding the HTTP header using the HTTP context:

    $client = new SoapClient('http://url.wsdl&v=latest', [
      'stream_context' => stream_context_create([
        'http' => [
          'content_type' => 'foobarX',
        ],
      ]),
    ]);

5 years agoDeprecate and ignore $version parameter of curl_version()
Christoph M. Becker [Mon, 13 May 2019 06:53:41 +0000 (08:53 +0200)]
Deprecate and ignore $version parameter of curl_version()

`curl_version()`[1] (of ext/curl) makes `curl_version_info()`[2] (of
libcurl) available to PHP userland.  The latter requires to pass an
`age` argument which usually is `CURLVERSION_NOW`, so that the
information returned by the runtime matches the declarations used
during compile time.  For C programs it is simply necessary to pass
this information, and in rare occasions it might make sense to pass
something else than `CURLVERSION_NOW`.  curl.h notes:

| The 'CURLVERSION_NOW' is the symbolic name meant to be used by
| basically all programs ever that want to get version information.

For the PHP binding, using a newer `age` than available at compile time
will neither provide the PHP program more information, nor would using
an older `age` have tangible benefits.

We therefore deprecate the useless `$version` parameter, and if it is
passed nonetheless, we use `CURLVERSION_NOW` instead of the supplied
value, and raise a warning.

[1] <https://www.php.net/manual/en/function.curl-version.php>
[2] <https://curl.haxx.se/libcurl/c/curl_version_info.html>

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Peter Kokot [Mon, 13 May 2019 01:53:49 +0000 (03:53 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Convert CRLF to LF

5 years agoMerge branch 'PHP-7.2' into PHP-7.3
Peter Kokot [Mon, 13 May 2019 01:53:31 +0000 (03:53 +0200)]
Merge branch 'PHP-7.2' into PHP-7.3

* PHP-7.2:
  Convert CRLF to LF

5 years agoConvert CRLF to LF
Peter Kokot [Mon, 13 May 2019 01:51:00 +0000 (03:51 +0200)]
Convert CRLF to LF

These files are tracked with CRLF line endings in Git and can be
converted to LF. Neither are parts of tests or code itself.

5 years ago[ci skip] Remove outdated fastcgi info in favor of the manual
Peter Kokot [Mon, 13 May 2019 00:57:20 +0000 (02:57 +0200)]
[ci skip] Remove outdated fastcgi info in favor of the manual

5 years ago[ci skip] Refactor libgd docs
Peter Kokot [Sun, 12 May 2019 21:51:39 +0000 (23:51 +0200)]
[ci skip] Refactor libgd docs

Changes to simplify managing libgd docs a bit:
- Move copyright statement and licensing info to common redistributable
  bins file. All previous notices left intact and updated with the
  upstream info.
- Remove unsynced and difficult to track README file compared to
  upstream README.md file available at https://github.com/libgd/libgd

5 years ago[ci skip] Migrate intl error conventions docs to Markdown
Peter Kokot [Sun, 12 May 2019 21:24:03 +0000 (23:24 +0200)]
[ci skip] Migrate intl error conventions docs to Markdown

5 years ago[ci skip] Migrate oci8 README to Markdown
Peter Kokot [Sun, 12 May 2019 20:09:09 +0000 (22:09 +0200)]
[ci skip] Migrate oci8 README to Markdown

5 years ago[ci skip] Migrate tests READMEs to Markdown
Peter Kokot [Sun, 12 May 2019 20:03:10 +0000 (22:03 +0200)]
[ci skip] Migrate tests READMEs to Markdown

5 years ago[ci skip] Migrate libxmlrpc README to Markdown
Peter Kokot [Sun, 12 May 2019 19:08:06 +0000 (21:08 +0200)]
[ci skip] Migrate libxmlrpc README to Markdown

5 years agoNormalize comments in *nix build system m4 files
Peter Kokot [Sun, 12 May 2019 16:43:03 +0000 (18:43 +0200)]
Normalize comments in *nix build system m4 files

Normalization include:
- Use dnl for everything that can be ommitted when configure is built in
  favor of the shell comment character # which is visible in the output.
- Line length normalized to 80 columns
- Dots for most of the one line sentences
- Macro definitions include similar pattern header comments now

5 years agoFix typos in upgrade notes
Theodore Brown [Sun, 12 May 2019 15:19:54 +0000 (10:19 -0500)]
Fix typos in upgrade notes

5 years agoPrevent race conditions
Christoph M. Becker [Sun, 12 May 2019 15:16:41 +0000 (17:16 +0200)]
Prevent race conditions

Since all current ODBC test cases use the same DSN, there may be
conflicts when running tests in parallel.  We prevent this by adding a
CONFLICTS marker which might be unnecessarily general, but get's the
job done, and still can be refined later.

5 years agoRemove unused variable
Peter Kokot [Sun, 12 May 2019 01:23:37 +0000 (03:23 +0200)]
Remove unused variable

5 years agoRemove duplicate variables
Vinicius Dias [Sun, 12 May 2019 00:52:06 +0000 (21:52 -0300)]
Remove duplicate variables

Removing duplicate variables `$beginDtObj` and `$beginTimestamp`.

5 years agoUse PKG_CHECK_MODULES to detect the iODBC library
Hugh McMaster [Wed, 8 May 2019 12:32:56 +0000 (22:32 +1000)]
Use PKG_CHECK_MODULES to detect the iODBC library

5 years agoUse PKG_CHECK_MODULES to detect the systemd library
Hugh McMaster [Fri, 10 May 2019 12:00:39 +0000 (22:00 +1000)]
Use PKG_CHECK_MODULES to detect the systemd library

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Jakub Zelenka [Sat, 11 May 2019 19:10:13 +0000 (20:10 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

5 years agoMerge branch 'PHP-7.2' into PHP-7.3
Jakub Zelenka [Sat, 11 May 2019 19:08:57 +0000 (20:08 +0100)]
Merge branch 'PHP-7.2' into PHP-7.3

5 years agoFix bug #77934 (php-fpm kill -USR2 not working)
Jakub Zelenka [Sat, 11 May 2019 19:07:39 +0000 (20:07 +0100)]
Fix bug #77934 (php-fpm kill -USR2 not working)

5 years agoUsing PDO instead because of consistency
peter279k [Sat, 11 May 2019 18:19:07 +0000 (02:19 +0800)]
Using PDO instead because of consistency

5 years agolist interfaces/adding just "binary" state status.
David Carlier [Sun, 27 Jan 2019 21:59:28 +0000 (21:59 +0000)]
list interfaces/adding just "binary" state status.

5 years agoRemove dead DEBUG_CFLAGS setting
Peter Kokot [Sat, 11 May 2019 13:10:44 +0000 (15:10 +0200)]
Remove dead DEBUG_CFLAGS setting

The USE_MAINTAINER_MODE has been removed via
a4c484a4d85e01874653570b7829a248330eb9fb and
43ed9039494a7484c2e3997ceae191ed6b640a62

5 years agoRemove unused symbol definition
Peter Kokot [Sat, 11 May 2019 11:18:25 +0000 (13:18 +0200)]
Remove unused symbol definition

5 years agoRemove redundant memory.h file
Peter Kokot [Sat, 11 May 2019 00:31:01 +0000 (02:31 +0200)]
Remove redundant memory.h file

The memory.h file is part of the pre-C89 era and is on today's systems
only a simple wrapper for including the final string.h header file.

5 years agoSimplify ext/mbstring/libmbfl/config.h creation
Peter Kokot [Sat, 11 May 2019 00:26:29 +0000 (02:26 +0200)]
Simplify ext/mbstring/libmbfl/config.h creation

- The config.h.in is part of the standalone libmbfl library and it is
  forked and bundled.

5 years agoIntegrate libmbfl docs to README.md and LICENSE
Peter Kokot [Sat, 11 May 2019 16:29:30 +0000 (18:29 +0200)]
Integrate libmbfl docs to README.md and LICENSE

- All credits, license info preserved, only merged together to not have
  to many places to edit.
- Changelogs integrated in the readme since they are not used anymore.

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Peter Kokot [Sat, 11 May 2019 15:16:50 +0000 (17:16 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Convert CRLF to LF in *.wsdl files

5 years agoMerge branch 'PHP-7.2' into PHP-7.3
Peter Kokot [Sat, 11 May 2019 15:15:08 +0000 (17:15 +0200)]
Merge branch 'PHP-7.2' into PHP-7.3

* PHP-7.2:
  Convert CRLF to LF in *.wsdl files

5 years agoConvert CRLF to LF in *.wsdl files
Peter Kokot [Sat, 11 May 2019 15:12:28 +0000 (17:12 +0200)]
Convert CRLF to LF in *.wsdl files

These EOL types are part of different environments and not part of the
tests themselves.

5 years agoFix comment to match the future zts configuration option
Peter Kokot [Sat, 11 May 2019 13:03:17 +0000 (15:03 +0200)]
Fix comment to match the future zts configuration option

5 years agoRemove ffi README in favour of docs
Peter Kokot [Wed, 8 May 2019 22:29:43 +0000 (00:29 +0200)]
Remove ffi README in favour of docs

- https://www.php.net/manual/en/book.ffi.php
- The FFI C parser is mentioned in the CONTRIBUTING.md file

5 years agoPrevent race condition
Christoph M. Becker [Sat, 11 May 2019 07:51:36 +0000 (09:51 +0200)]
Prevent race condition

This test may conflict with readdir_variation3.phpt otherwise.

5 years agoRename *.jpeg files to *.jpg
Peter Kokot [Sat, 11 May 2019 01:22:19 +0000 (03:22 +0200)]
Rename *.jpeg files to *.jpg

These file extensions are not part of these tests and *.jpg is more
common.

5 years agoBump config.guess and config.sub
Peter Kokot [Fri, 10 May 2019 22:24:26 +0000 (00:24 +0200)]
Bump config.guess and config.sub

```
wget -O config.guess 'https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD'
wget -O config.sub 'https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD'
```

5 years agoRemove unused variables
Peter Kokot [Fri, 10 May 2019 02:02:14 +0000 (04:02 +0200)]
Remove unused variables

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Fri, 10 May 2019 16:46:18 +0000 (18:46 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix typo

5 years agoMerge branch 'PHP-7.2' into PHP-7.3
Christoph M. Becker [Fri, 10 May 2019 16:44:47 +0000 (18:44 +0200)]
Merge branch 'PHP-7.2' into PHP-7.3

* PHP-7.2:
  Fix typo

5 years agoFix typo
Christoph M. Becker [Fri, 10 May 2019 16:43:40 +0000 (18:43 +0200)]
Fix typo

Since opcache.enable defaults to 1 anyway, this change is only
cosmetic.

5 years agoMerge branch 'PHP-7.4' of git.php.net:/php-src into PHP-7.4
Kalle Sommer Nielsen [Thu, 9 May 2019 23:38:12 +0000 (02:38 +0300)]
Merge branch 'PHP-7.4' of git.php.net:/php-src into PHP-7.4

5 years agoNEWS and UPGRADING for the scatter filter
Kalle Sommer Nielsen [Thu, 9 May 2019 23:37:02 +0000 (02:37 +0300)]
NEWS and UPGRADING for the scatter filter

5 years agoImplemented the gdScatter filter I wrote almost 10 years ago
Kalle Sommer Nielsen [Thu, 9 May 2019 23:23:40 +0000 (02:23 +0300)]
Implemented the gdScatter filter I wrote almost 10 years ago

This filter is available as of libgd 2.1.0 which is our bare minimum for
external compilation of ext/gd.

The scatter filter works by iterating over all pixels in the image and
shifting them randomly based on two modifier (`plus` and `sub`) values:

dest_x = (int)(x + ((rand() % (plus - sub)) + sub));
dest_y = (int)(y + ((rand() % (plus - sub)) + sub));

Additionally the scatter filter also supports by only shifting pixels where
the current pixel being iterated is one or more colors, allowing the scatter
filter to only effect solid colors in part of an image.

Note, due to the nature of randomness and implementation, pixels who were
shifted ahead of iteration will be shifted once more and therefore the
bottom right of an image may contain a slight scatter effect due to this.

5 years agoRemove unused variable
Peter Kokot [Thu, 9 May 2019 23:05:19 +0000 (01:05 +0200)]
Remove unused variable

5 years agoRemove dead code from configure.ac
Peter Kokot [Tue, 7 May 2019 02:05:14 +0000 (04:05 +0200)]
Remove dead code from configure.ac

SAPI apache has been removed and now there is apache2handler so this
warning hasn't been used for a while.

5 years agoDisable checking for library in ext skeleton
Peter Kokot [Thu, 9 May 2019 22:21:09 +0000 (00:21 +0200)]
Disable checking for library in ext skeleton

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
George Wang [Thu, 9 May 2019 22:15:48 +0000 (18:15 -0400)]
Merge branch 'PHP-7.3' into PHP-7.4

5 years agoMerge branch 'PHP-7.2' into PHP-7.3
George Wang [Thu, 9 May 2019 22:14:11 +0000 (18:14 -0400)]
Merge branch 'PHP-7.2' into PHP-7.3

5 years agoUpdated LiteSpeed SAPI to 7.3.2 to allow request header value length up to 64K.
George Wang [Thu, 9 May 2019 22:13:25 +0000 (18:13 -0400)]
Updated LiteSpeed SAPI to 7.3.2 to allow request header value length up to 64K.

5 years agoRemove unused functions
Peter Kokot [Thu, 9 May 2019 02:33:13 +0000 (04:33 +0200)]
Remove unused functions

- _get_zval_ptr_cv_deref_BP_VAR_UNSET
- _get_zval_ptr_cv_deref_BP_VAR_IS
- _get_zval_ptr_cv_deref_BP_VAR_RW
- _get_zval_ptr_cv_deref_BP_VAR_W

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Thu, 9 May 2019 14:56:57 +0000 (16:56 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix erroneous assertions

5 years agoMerge branch 'PHP-7.2' into PHP-7.3
Christoph M. Becker [Thu, 9 May 2019 14:55:35 +0000 (16:55 +0200)]
Merge branch 'PHP-7.2' into PHP-7.3

* PHP-7.2:
  Fix erroneous assertions

5 years agoFix erroneous assertions
Christoph M. Becker [Thu, 9 May 2019 14:54:11 +0000 (16:54 +0200)]
Fix erroneous assertions

Since PHP strings are binary safe (i.e. they may contain NUL bytes), we
must not assume that strlen()/wcslen() actually return the length of
the string.  Only if the given in_len is zero, it is safe to assert
this.

5 years agoUpdate the extension template file to use PKG_CHECK_MODULES
Hugh McMaster [Sun, 5 May 2019 13:25:40 +0000 (23:25 +1000)]
Update the extension template file to use PKG_CHECK_MODULES

5 years agoFixed bug #71030
Nikita Popov [Thu, 9 May 2019 12:19:53 +0000 (14:19 +0200)]
Fixed bug #71030

Make sure to always fetch the RHS of a list assignment first, instead
of special casing known self-assignments, which will not detect cases
using references correctly.

As a side-effect, it is no longer possible to do something like
byRef(list($x) = $y). This worked by accident previously, but only
if $y was a CV and the self-assignment case did not trigger.
However it shouldn't work for the same reason that byRef($x = $y)
doesn't. Conversely byRef(list(&$x) = $y) and byRef($x =& $y)
continue to be legal.

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Thu, 9 May 2019 10:36:20 +0000 (12:36 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

5 years agoMerge branch 'PHP-7.2' into PHP-7.3
Nikita Popov [Thu, 9 May 2019 10:34:46 +0000 (12:34 +0200)]
Merge branch 'PHP-7.2' into PHP-7.3

5 years agoFixed bug #75186
Nikita Popov [Thu, 9 May 2019 10:29:33 +0000 (12:29 +0200)]
Fixed bug #75186

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Thu, 9 May 2019 10:16:16 +0000 (12:16 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix log_verbosity_bug.phpt

5 years agoMerge branch 'PHP-7.2' into PHP-7.3
Christoph M. Becker [Thu, 9 May 2019 10:15:32 +0000 (12:15 +0200)]
Merge branch 'PHP-7.2' into PHP-7.3

* PHP-7.2:
  Fix log_verbosity_bug.phpt

5 years agoFix log_verbosity_bug.phpt
Christoph M. Becker [Thu, 9 May 2019 10:15:00 +0000 (12:15 +0200)]
Fix log_verbosity_bug.phpt

This test may fail on Windows due to the file cache fallback.  We
ensure that this will not happen.

5 years agoFixed bug #77951
Nikita Popov [Thu, 9 May 2019 10:02:16 +0000 (12:02 +0200)]
Fixed bug #77951

Treat singleton references as non-references in ReflectionReference
and return null for them.

5 years agoRemove unused functions
Peter Kokot [Tue, 7 May 2019 01:07:21 +0000 (03:07 +0200)]
Remove unused functions

- zend_mm_bitset_find_zero
- zend_mm_bitset_find_one
- zend_mm_bitset_find_zero_and_set
- zend_is_by_ref_func_arg_fetch

5 years agoRemove redundant example/test libsodium.php file
Peter Kokot [Mon, 6 May 2019 00:10:06 +0000 (02:10 +0200)]
Remove redundant example/test libsodium.php file

5 years agoRemove unused example/test fileinfo.php script
Peter Kokot [Sun, 5 May 2019 23:48:50 +0000 (01:48 +0200)]
Remove unused example/test fileinfo.php script

5 years agoRemove example PHP script from FFI
Peter Kokot [Sun, 5 May 2019 23:40:15 +0000 (01:40 +0200)]
Remove example PHP script from FFI

FFI README.md already includes the PHP example with more information.

5 years agoRemove vcsclean script
Peter Kokot [Sat, 4 May 2019 15:28:24 +0000 (17:28 +0200)]
Remove vcsclean script

The vcsclean script is really only a wrapper for a git clean command.
Developers should use the more proper and clear native Git command
directly instead:
`git clean -Xfd`

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Wed, 8 May 2019 17:26:02 +0000 (19:26 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Add {TMP} placeholder for PHPT INI sections

5 years agoMerge branch 'PHP-7.2' into PHP-7.3
Christoph M. Becker [Wed, 8 May 2019 17:22:21 +0000 (19:22 +0200)]
Merge branch 'PHP-7.2' into PHP-7.3

* PHP-7.2:
  Add {TMP} placeholder for PHPT INI sections

5 years agoAdd {TMP} placeholder for PHPT INI sections
Christoph M. Becker [Wed, 8 May 2019 15:54:02 +0000 (17:54 +0200)]
Add {TMP} placeholder for PHPT INI sections

Several tests use `/tmp` in the `--INI--` section, but this is not
portable.  We therefore introduce the `{TMP}` placeholder which
evaluates to the system's temporary directory using
`sys_get_temp_dir()`.

We also remove the doubtful `strpos()` optimization.

5 years agoUse fast zpp for ReflectionClass constructor
Nikita Popov [Wed, 8 May 2019 15:04:28 +0000 (17:04 +0200)]
Use fast zpp for ReflectionClass constructor

At this point zpp overhead makes up a significant part of this
function.

5 years agoImprove PHP hash function.
Dmitry Stogov [Wed, 8 May 2019 13:43:54 +0000 (16:43 +0300)]
Improve PHP hash function.
See Daniel Lemire's blog post https://lemire.me/blog/2016/07/21/accelerating-php-hashing-by-unoptimizing-it/

5 years agoOptimize $name/$class property population in reflection
Nikita Popov [Wed, 8 May 2019 13:30:53 +0000 (15:30 +0200)]
Optimize $name/$class property population in reflection

Instead of going through write_property, directly assign to the
respective property slot.

5 years agoRefactor inheritance type check implementation
Nikita Popov [Wed, 8 May 2019 10:11:12 +0000 (12:11 +0200)]
Refactor inheritance type check implementation

Extract the self/parent name resolution code and drop unnecessary
string copies/releases. Store the fe/proto types in local variables.

5 years agoDeduplicate inheritance type check implementation
Nikita Popov [Wed, 8 May 2019 09:24:08 +0000 (11:24 +0200)]
Deduplicate inheritance type check implementation

Make the check covariant (insofar as it is allowed now, i.e.
nullability and iterable) and call it with appropriate argument
order for both parameter and return types.

This makes it simpler to extend to full variance support.

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Wed, 8 May 2019 09:38:03 +0000 (11:38 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

5 years agoMerge branch 'PHP-7.2' into PHP-7.3
Nikita Popov [Wed, 8 May 2019 09:37:49 +0000 (11:37 +0200)]
Merge branch 'PHP-7.2' into PHP-7.3

5 years agoFix resolution of "parent" during inheritance check
Nikita Popov [Wed, 8 May 2019 09:33:13 +0000 (11:33 +0200)]
Fix resolution of "parent" during inheritance check

We can't assume that the method we're checking against is part of
the parent class...

5 years agoDeprecate CURLPIPE_HTTP1
Christoph M. Becker [Tue, 7 May 2019 15:05:07 +0000 (17:05 +0200)]
Deprecate CURLPIPE_HTTP1

`CURLPIPE_HTTP1` is deprecated and has no effect as of cURL 7.62.0[1].
We therefore deprecate the PHP constant as well, and trigger a warning
that it is no longer supported, if used against cURL 7.62.0 and up.

[1] <https://curl.haxx.se/libcurl/c/CURLMOPT_PIPELINING.html>

5 years ago[AArch64] Use NEON to initialize zend_hash
Sebastian Pop [Wed, 17 Apr 2019 15:03:37 +0000 (15:03 +0000)]
[AArch64] Use NEON to initialize zend_hash

On A72, google-benchmark measure before and after the patch:
--------------------------------------------------------------
Benchmark                    Time             CPU   Iterations
--------------------------------------------------------------
BM_hash_init_before       43.6 ns         43.6 ns     16052937
BM_hash_init_after        27.0 ns         27.0 ns     25877296

Patch written by Ali Saidi <alisaidi@amazon.com>
and Sebastian Pop <spop@amazon.com>

5 years agoAdd --with-ffi on Travis
Nikita Popov [Tue, 7 May 2019 12:32:06 +0000 (14:32 +0200)]
Add --with-ffi on Travis

5 years agoAvoid some maybe uninitialized warnings in ffi
Nikita Popov [Tue, 7 May 2019 13:21:08 +0000 (15:21 +0200)]
Avoid some maybe uninitialized warnings in ffi

All false positives.

5 years agospeed up increment and decrement operators with overflow detection
Sebastian Pop [Tue, 23 Apr 2019 20:18:39 +0000 (20:18 +0000)]
speed up increment and decrement operators with overflow detection

On A72, google-benchmark measure before and after the patch:
--------------------------------------------------------
Benchmark              Time             CPU   Iterations
--------------------------------------------------------
BM_inc_before       6.54 ns         6.54 ns    106985447
BM_dec_before       6.54 ns         6.54 ns    107011667
BM_inc_after        4.36 ns         4.36 ns    160525864
BM_dec_after        4.36 ns         4.36 ns    160524243

Before the patch:
fast_long_add_function:
ldr x0, [x1]
add x2, x0, 1
cmp x2, x0
blt .L11
str x2, [x1]
ret
.L11:
mov x0, 4890909195324358656
mov w2, 5
str x0, [x1]
str w2, [x1, 8]
ret

With the patch:
fast_long_add_function:
ldr x5, [x1]
adds x5,x5,1
bvs .L2
str x5, [x1]
ret
.L2:
mov x0, 4890909195324358656
mov w2, 5
str x0, [x1]
str w2, [x1, 8]
ret

    php$ ./sapi/cli/php Zend/bench.php

Base:                         Patch:
simple             0.091      simple             0.091
simplecall         0.014      simplecall         0.014
simpleucall        0.041      simpleucall        0.041
simpleudcall       0.045      simpleudcall       0.045
mandel             0.193      mandel             0.193
mandel2            0.229      mandel2            0.229
ackermann(7)       0.044      ackermann(7)       0.044
ary(50000)         0.010      ary(50000)         0.010
ary2(50000)        0.008      ary2(50000)        0.008
ary3(2000)         0.096      ary3(2000)         0.102
fibo(30)           0.149      fibo(30)           0.148
hash1(50000)       0.016      hash1(50000)       0.016
hash2(500)         0.020      hash2(500)         0.020
heapsort(20000)    0.055      heapsort(20000)    0.055
matrix(20)         0.057      matrix(20)         0.057
nestedloop(12)     0.091      nestedloop(12)     0.091
sieve(30)          0.032      sieve(30)          0.032
strcat(200000)     0.010      strcat(200000)     0.010
------------------------      ------------------------
Total              1.199      Total              1.204

    php$ ./sapi/cli/php Zend/micro_bench.php

Base:                                      Patch:
empty_loop         0.051                   empty_loop         0.050
func()             0.181    0.130          func()             0.181    0.131
undef_func()       0.186    0.135          undef_func()       0.186    0.136
int_func()         0.116    0.064          int_func()         0.116    0.065
$x = self::$x      0.235    0.183          $x = self::$x      0.229    0.179
self::$x = 0       0.198    0.147          self::$x = 0       0.199    0.148
isset(self::$x)    0.229    0.178          isset(self::$x)    0.225    0.174
empty(self::$x)    0.231    0.180          empty(self::$x)    0.227    0.177
$x = Foo::$x       0.144    0.093          $x = Foo::$x       0.142    0.092
Foo::$x = 0        0.107    0.056          Foo::$x = 0        0.105    0.054
isset(Foo::$x)     0.140    0.088          isset(Foo::$x)     0.140    0.089
empty(Foo::$x)     0.148    0.097          empty(Foo::$x)     0.144    0.094
self::f()          0.238    0.187          self::f()          0.240    0.190
Foo::f()           0.209    0.158          Foo::f()           0.201    0.150
$x = $this->x      0.123    0.072          $x = $this->x      0.120    0.070
$this->x = 0       0.124    0.073          $this->x = 0       0.124    0.074
$this->x += 2      0.151    0.099          $this->x += 2      0.151    0.101
++$this->x         0.137    0.086          ++$this->x         0.139    0.088
--$this->x         0.137    0.086          --$this->x         0.137    0.087
$this->x++         0.170    0.119          $this->x++         0.172    0.122
$this->x--         0.171    0.119          $this->x--         0.172    0.122
isset($this->x)    0.170    0.119          isset($this->x)    0.170    0.120
empty($this->x)    0.179    0.128          empty($this->x)    0.179    0.129
$this->f()         0.194    0.143          $this->f()         0.194    0.144
$x = Foo::TEST     0.188    0.137          $x = Foo::TEST     0.188    0.138
new Foo()          0.482    0.431          new Foo()          0.482    0.432
$x = TEST          0.109    0.058          $x = TEST          0.109    0.059
$x = $_GET         0.190    0.138          $x = $_GET         0.188    0.137
$x = $GLOBALS['v'] 0.242    0.191          $x = $GLOBALS['v'] 0.246    0.196
$x = $hash['v']    0.196    0.145          $x = $hash['v']    0.192    0.142
$x = $str[0]       0.146    0.094          $x = $str[0]       0.142    0.092
$x = $a ?: null    0.144    0.093          $x = $a ?: null    0.144    0.094
$x = $f ?: tmp     0.174    0.123          $x = $f ?: tmp     0.174    0.124
$x = $f ? $f : $a  0.153    0.101          $x = $f ? $f : $a  0.153    0.102
$x = $f ? $f : tmp 0.148    0.097          $x = $f ? $f : tmp 0.148    0.098
------------------------                   ------------------------
Total              6.143                   Total              6.108