]> granicus.if.org Git - php/log
php
4 years agoFix #79462: method_exists and property_exists incoherent behavior
Christoph M. Becker [Thu, 9 Apr 2020 08:55:53 +0000 (10:55 +0200)]
Fix #79462: method_exists and property_exists incoherent behavior

Both functions are closely related, so should behave the same for wrong
input types, i.e. both should throw a TypeError.

4 years agoAdd test to make sure internal param default eval doesn't error
Nikita Popov [Thu, 9 Apr 2020 09:22:00 +0000 (11:22 +0200)]
Add test to make sure internal param default eval doesn't error

4 years agoMerge branch 'PHP-7.4'
Nikita Popov [Thu, 9 Apr 2020 08:35:50 +0000 (10:35 +0200)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Fixed bug #78434

4 years agoFixed bug #78434
Nikita Popov [Fri, 3 Apr 2020 08:06:41 +0000 (10:06 +0200)]
Fixed bug #78434

The DO_INIT flag, which will skip the first resume on a primed
generator, should always be set when starting to yield from a
new generator, not only when the yield from happens during priming.

4 years agoStore default parameter values of internal functions in arg info
Máté Kocsis [Mon, 6 Apr 2020 09:02:13 +0000 (11:02 +0200)]
Store default parameter values of internal functions in arg info

Closes GH-5353. From now on, PHP will have reflection information
about default values of parameters of internal functions.

Co-authored-by: Nikita Popov <nikita.ppv@gmail.com>
4 years agoMerge branch 'PHP-7.4'
Nikita Popov [Wed, 8 Apr 2020 15:11:50 +0000 (17:11 +0200)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Add php_cli_server_connect() helper

4 years agoAdd php_cli_server_connect() helper
Nikita Popov [Wed, 8 Apr 2020 15:10:20 +0000 (17:10 +0200)]
Add php_cli_server_connect() helper

To encapsulate the repeated fsockopen() code.

This gives us a chance to control the timeout in one place:
Raise it to one second.

4 years agoMerge branch 'PHP-7.4'
Nikita Popov [Wed, 8 Apr 2020 14:38:18 +0000 (16:38 +0200)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Make mysqli_poll test more deterministic

4 years agoMake mysqli_poll test more deterministic
Nikita Popov [Wed, 8 Apr 2020 14:36:01 +0000 (16:36 +0200)]
Make mysqli_poll test more deterministic

Handle errors appearing in different order.

4 years agoFix typo in GD stub
Nikita Popov [Wed, 8 Apr 2020 10:02:27 +0000 (12:02 +0200)]
Fix typo in GD stub

4 years agoUpdate mb_strrpos() stub
Nikita Popov [Wed, 8 Apr 2020 10:00:48 +0000 (12:00 +0200)]
Update mb_strrpos() stub

We no longer accept the encoding as 3rd param, so we can make this
a proper int argument.

4 years agoDump information about trace side exits
Dmitry Stogov [Wed, 8 Apr 2020 09:39:24 +0000 (12:39 +0300)]
Dump information about trace side exits

4 years agoMerge branch 'PHP-7.4'
Christoph M. Becker [Wed, 8 Apr 2020 09:35:28 +0000 (11:35 +0200)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Relax overly strict test expectation

4 years agoRelax overly strict test expectation
Christoph M. Becker [Wed, 8 Apr 2020 09:29:49 +0000 (11:29 +0200)]
Relax overly strict test expectation

There is no reason to expect a `1` after the PID; neither the session
ID nor the memory usage are required to contain one.  Actually, we just
want to verify here, that the process with the $child_pid is running,
and is a php.exe process.

4 years agoMerge branch 'PHP-7.4'
Christoph M. Becker [Wed, 8 Apr 2020 08:37:28 +0000 (10:37 +0200)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Fix memory leak introduced by fixing bug #78221

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Wed, 8 Apr 2020 08:36:57 +0000 (10:36 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix memory leak introduced by fixing bug #78221

4 years agoFix memory leak introduced by fixing bug #78221
Christoph M. Becker [Wed, 8 Apr 2020 08:35:54 +0000 (10:35 +0200)]
Fix memory leak introduced by fixing bug #78221

We have to free the retrieved text content; to keep the code readable,
we extract a helper function to check for empty nodes.  Unfortunately,
we cannot use xmlIsBlankNode(), because that also recognizes whitespace
only text content.

We also make sure to properly handle NULL returns from
xmlNodeGetContent().

4 years agoMerge branch 'PHP-7.4'
Nikita Popov [Wed, 8 Apr 2020 07:41:26 +0000 (09:41 +0200)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Fix test

4 years agoFix test
Nikita Popov [Wed, 8 Apr 2020 07:41:14 +0000 (09:41 +0200)]
Fix test

4 years agoUpdate stack type, only if necessary
Dmitry Stogov [Wed, 8 Apr 2020 07:34:24 +0000 (10:34 +0300)]
Update stack type, only if necessary

4 years agoFixed TYPE/INFO mismatch
Dmitry Stogov [Tue, 7 Apr 2020 21:27:19 +0000 (00:27 +0300)]
Fixed TYPE/INFO mismatch

4 years agoMerge branch 'PHP-7.4'
George Peter Banyard [Tue, 7 Apr 2020 20:49:17 +0000 (22:49 +0200)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Revert "Went to fast and forgot to update tests"
  Revert "Fix Bug #79448 0 is a valid Unicode codepoint, but mb_substitute_character(0) fails"

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
George Peter Banyard [Tue, 7 Apr 2020 20:27:00 +0000 (22:27 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Revert "Went to fast and forgot to update tests"
  Revert "Fix Bug #79448 0 is a valid Unicode codepoint, but mb_substitute_character(0) fails"

4 years agoRevert "Went to fast and forgot to update tests"
George Peter Banyard [Tue, 7 Apr 2020 20:24:40 +0000 (22:24 +0200)]
Revert "Went to fast and forgot to update tests"

This reverts commit 656eac74fa6074aebc087bb73d2e4651f7dc8c9e.

4 years agoRevert "Fix Bug #79448 0 is a valid Unicode codepoint, but mb_substitute_character...
George Peter Banyard [Tue, 7 Apr 2020 20:23:24 +0000 (22:23 +0200)]
Revert "Fix Bug #79448 0 is a valid Unicode codepoint, but mb_substitute_character(0) fails"

This commit brings some substantial changes in behaviour due to the weird implementation.
This will be fixed in master due to BC concerns.

This reverts commit 1333b46d6dc0c293c1fd626803f91bc69743eb79.

4 years agocleanup
Dmitry Stogov [Tue, 7 Apr 2020 18:37:10 +0000 (21:37 +0300)]
cleanup

4 years agoRevert "cleanup" (wrong commit)
Dmitry Stogov [Tue, 7 Apr 2020 18:34:18 +0000 (21:34 +0300)]
Revert "cleanup" (wrong commit)

This reverts commit 5db5f71f2831df4d32484a5638f6f6aa72e364a5.

4 years agocleanup
Dmitry Stogov [Tue, 7 Apr 2020 18:30:47 +0000 (21:30 +0300)]
cleanup

4 years agoRemove most uses of _default_get_name()
Nikita Popov [Tue, 7 Apr 2020 14:42:40 +0000 (16:42 +0200)]
Remove most uses of _default_get_name()

Instead fetch the name from the respective structure. The only
place where this is still used is ReflectionClassConst,
as zend_class_const does not store the name.

4 years agoEliminate uses of _default_load_name()
Nikita Popov [Tue, 7 Apr 2020 14:25:44 +0000 (16:25 +0200)]
Eliminate uses of _default_load_name()

Instead fetch the name from the function/class/property,
as appropriate. This makes us independent of the property,
and eliminates error conditions related to it.

4 years agoOptimize internal name fetching in reflection
Nikita Popov [Tue, 7 Apr 2020 14:10:19 +0000 (16:10 +0200)]
Optimize internal name fetching in reflection

Directly fetch the name property, instead of construction the
properties hash table and performing a lookup in it. This is both
slow and wastes a lot of memory.

4 years agoAssert that arginfo parameter name is present
Nikita Popov [Tue, 7 Apr 2020 14:05:33 +0000 (16:05 +0200)]
Assert that arginfo parameter name is present

4 years agoMerge branch 'PHP-7.4'
Christoph M. Becker [Tue, 7 Apr 2020 11:09:10 +0000 (13:09 +0200)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Fix #78221: DOMNode::normalize() doesn't remove empty text nodes

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Tue, 7 Apr 2020 11:05:37 +0000 (13:05 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #78221: DOMNode::normalize() doesn't remove empty text nodes

4 years agoFix #78221: DOMNode::normalize() doesn't remove empty text nodes
Christoph M. Becker [Wed, 11 Mar 2020 12:02:09 +0000 (13:02 +0100)]
Fix #78221: DOMNode::normalize() doesn't remove empty text nodes

If a text node is not followed by another text node, we remove it, if
its textContent is empty.

4 years agoFree room for information about register allocation at astact stack and at trace_exit...
Dmitry Stogov [Tue, 7 Apr 2020 09:01:48 +0000 (12:01 +0300)]
Free room for information about register allocation at astact stack and at trace_exit_info. Implement simple deoptimizer.

4 years agoSave CPU regesters on side exit for deoptimization
Dmitry Stogov [Mon, 6 Apr 2020 20:48:20 +0000 (23:48 +0300)]
Save CPU regesters on side exit for deoptimization

4 years agoMinor register allocator refactoring
Dmitry Stogov [Mon, 6 Apr 2020 13:17:02 +0000 (16:17 +0300)]
Minor register allocator refactoring

4 years agoMerge branch 'PHP-7.4'
Christoph M. Becker [Mon, 6 Apr 2020 10:03:01 +0000 (12:03 +0200)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Fix #69264: __debugInfo() ignored while extending SPL classes

4 years agoFix #69264: __debugInfo() ignored while extending SPL classes
Christoph M. Becker [Mon, 6 Apr 2020 09:02:15 +0000 (11:02 +0200)]
Fix #69264: __debugInfo() ignored while extending SPL classes

We actually implement `::__debugInfo()` and drop the `get_debug_info()`
handlers of all relevant SPL classes.  This is cleaner and gives more
flexibility regarding overriding the functionality in descendant
classes.

4 years agoInline a ZEND_NUM_ARGS() variable
Nikita Popov [Mon, 6 Apr 2020 09:41:44 +0000 (11:41 +0200)]
Inline a ZEND_NUM_ARGS() variable

4 years agoClean up constructor handling in com_dotnet
Christoph M. Becker [Mon, 6 Apr 2020 08:51:10 +0000 (10:51 +0200)]
Clean up constructor handling in com_dotnet

We substitute the construction magic with standard constructors, move
the ZPP checks to the beginning of the ctors, and also let the function
entries be generated from the stubs.

4 years agoImprove some ValueError messages
Máté Kocsis [Wed, 1 Apr 2020 21:32:39 +0000 (23:32 +0200)]
Improve some ValueError messages

Closes GH-5340

4 years agoGenerate function entries for another batch of extensions
Máté Kocsis [Sun, 5 Apr 2020 19:15:30 +0000 (21:15 +0200)]
Generate function entries for another batch of extensions

Closes GH-5352

4 years agoAdd missing stub for xmlrpc_get_type()
Máté Kocsis [Sun, 5 Apr 2020 18:09:58 +0000 (20:09 +0200)]
Add missing stub for xmlrpc_get_type()

4 years agoPromote invalid case mode to ValueError in mb_case_converter
George Peter Banyard [Sun, 5 Apr 2020 01:33:08 +0000 (03:33 +0200)]
Promote invalid case mode to ValueError in mb_case_converter

Add assertions to check the return value is not NULL as this indicates a bug.
Add identical assertion to mb_strtoupper and mb_strtolower.
This means these functions can't return false anymore, ammend stubs accordingly.

4 years agomb_scrub() can't return false anymore
George Peter Banyard [Fri, 3 Apr 2020 17:20:26 +0000 (19:20 +0200)]
mb_scrub() can't return false anymore

Also drop the intermediary function which was only used here

4 years agoPromote some warnings to ValueError in mbstring
George Peter Banyard [Fri, 3 Apr 2020 17:14:42 +0000 (19:14 +0200)]
Promote some warnings to ValueError in mbstring

Promoted warnings are:
 * Empty encoding lists
 * Unknown language
 * Start and Width out of bound

4 years agoConvert some if blocks to assertions
George Peter Banyard [Fri, 3 Apr 2020 16:20:43 +0000 (18:20 +0200)]
Convert some if blocks to assertions

4 years agoGenerate functions entries from stubs for another set of extensions
Máté Kocsis [Sat, 4 Apr 2020 21:51:10 +0000 (23:51 +0200)]
Generate functions entries from stubs for another set of extensions

Closes GH-5351

4 years agoMove variable declaration closer to its usage
Máté Kocsis [Sat, 4 Apr 2020 22:03:08 +0000 (00:03 +0200)]
Move variable declaration closer to its usage

4 years agoImprove gen_stub.php
Máté Kocsis [Sat, 4 Apr 2020 19:26:46 +0000 (21:26 +0200)]
Improve gen_stub.php

Closes GH-5350
Add support for generating deprecated function entries, as well as forward declaration
of function aliases.

4 years agoGenerate function entries from stubs for a couple of extensions
Máté Kocsis [Sat, 4 Apr 2020 18:41:42 +0000 (20:41 +0200)]
Generate function entries from stubs for a couple of extensions

Closes GH-5347

4 years agoAnnotate function aliases in stubs
Máté Kocsis [Sat, 4 Apr 2020 11:03:16 +0000 (13:03 +0200)]
Annotate function aliases in stubs

4 years agoMerge branch 'PHP-7.4'
George Peter Banyard [Fri, 3 Apr 2020 20:23:03 +0000 (22:23 +0200)]
Merge branch 'PHP-7.4'

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
George Peter Banyard [Fri, 3 Apr 2020 20:10:56 +0000 (22:10 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

4 years agoWent to fast and forgot to update tests
George Peter Banyard [Fri, 3 Apr 2020 20:03:00 +0000 (22:03 +0200)]
Went to fast and forgot to update tests

However due to the really lax conversion to integer all strings pass as 0

4 years agoMerge branch 'PHP-7.4'
George Peter Banyard [Fri, 3 Apr 2020 19:30:35 +0000 (21:30 +0200)]
Merge branch 'PHP-7.4'

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
George Peter Banyard [Fri, 3 Apr 2020 19:28:07 +0000 (21:28 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

4 years agoFix Bug #79448 0 is a valid Unicode codepoint, but mb_substitute_character(0) fails
George Peter Banyard [Fri, 3 Apr 2020 19:16:04 +0000 (21:16 +0200)]
Fix Bug #79448 0 is a valid Unicode codepoint, but mb_substitute_character(0) fails

4 years agoFix stub for zend_terminate_string()
Nikita Popov [Fri, 3 Apr 2020 16:21:40 +0000 (18:21 +0200)]
Fix stub for zend_terminate_string()

4 years agoVerify that all stubs have a return type
Nikita Popov [Fri, 3 Apr 2020 14:49:11 +0000 (16:49 +0200)]
Verify that all stubs have a return type

4 years agoStubs: Store information per-class
Nikita Popov [Fri, 3 Apr 2020 14:18:47 +0000 (16:18 +0200)]
Stubs: Store information per-class

We'll need this if we want to generate method entries.

4 years agoRemove now unnecessary PHP_FUNCTION() declarations
Nikita Popov [Fri, 3 Apr 2020 13:10:30 +0000 (15:10 +0200)]
Remove now unnecessary PHP_FUNCTION() declarations

4 years agoGenerate function entries from stubs
Nikita Popov [Fri, 21 Feb 2020 14:08:56 +0000 (15:08 +0100)]
Generate function entries from stubs

If @generate-function-entries is specified in the stub file,
also generate function entries for the extension.

Currently limited to free functions only.

4 years agoDo not include the same stub multiple times
Máté Kocsis [Sun, 29 Mar 2020 18:24:16 +0000 (20:24 +0200)]
Do not include the same stub multiple times

Closes GH-5322

4 years agoFix #68690: Hypothetical off-by-one condition
Christoph M. Becker [Fri, 3 Apr 2020 12:11:04 +0000 (14:11 +0200)]
Fix #68690: Hypothetical off-by-one condition

We fix this, even though `filter->cache == jisx0213_u2_tbl_len` can
never be true here.

4 years agoPromote unknown encoding throws in encoding array/string list
George Peter Banyard [Wed, 1 Apr 2020 12:40:15 +0000 (14:40 +0200)]
Promote unknown encoding throws in encoding array/string list

For the string list we emit still emit a warning by comparing arg_num to 0

Closes GH-5337

4 years agoadd some output when generating arginfo
Remi Collet [Thu, 2 Apr 2020 14:48:43 +0000 (16:48 +0200)]
add some output when generating arginfo

4 years agoMove gen_stub.php to build directory and install it so phpize can take care of it...
Remi Collet [Thu, 2 Apr 2020 14:34:05 +0000 (16:34 +0200)]
Move gen_stub.php to build directory and install it so phpize can take care of it, and thus extension can use it as it is already in Makefile

4 years agoMerge branch 'PHP-7.4'
Nikita Popov [Fri, 3 Apr 2020 08:06:52 +0000 (10:06 +0200)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Fix incorrect free for last_message

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Fri, 3 Apr 2020 08:06:09 +0000 (10:06 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix incorrect free for last_message

4 years agoFix incorrect free for last_message
Qianqian Bu [Fri, 3 Apr 2020 07:44:41 +0000 (15:44 +0800)]
Fix incorrect free for last_message

In commit a7305eb539596e175bd6c3ae9a20953358c5d677 the last_message
field of the connection object was changed to be always non-persistent.
But there is a place on change_user path that still treats it
depending on conn->persistent flag. This will cause PHP crash after
com_change_user success when there is last_message set

4 years agoRefactor mb_substr_count()
George Peter Banyard [Thu, 2 Apr 2020 20:38:28 +0000 (22:38 +0200)]
Refactor mb_substr_count()

Promote empty needle warning to ValueError
Convert if branch into an assertion as if mbfl_substr_count fails this now implies a bug
Thus mb_substr_count() can only return int now, fix stubs accordingly

4 years agoConvert if branch to assertion in mb_strlen
George Peter Banyard [Thu, 2 Apr 2020 20:10:02 +0000 (22:10 +0200)]
Convert if branch to assertion in mb_strlen

This operation should never fail, therefore it's converted to an assertion.
Thus this mb_strlen() can now only return int, fix stubs accordingly

4 years agoPromote mb_str_split warning to ValueError
George Peter Banyard [Thu, 2 Apr 2020 19:57:38 +0000 (21:57 +0200)]
Promote mb_str_split warning to ValueError

Also add a TODO about documenting this funcion on PHP.net
Convert some checks to assertions as if they don't hold something went wrong during memory allocation
Due to these changes this function cannot return false anymore, fix stubs accordingly

4 years agoMerge mb_strstr() variants under a common implementation
George Peter Banyard [Thu, 2 Apr 2020 18:48:09 +0000 (20:48 +0200)]
Merge mb_strstr() variants under a common implementation

This reduces heavy ducplicate code

4 years agoImprove code flow
George Peter Banyard [Thu, 2 Apr 2020 17:41:30 +0000 (19:41 +0200)]
Improve code flow

These nested if-else blocks are unnecessary since we return early.

4 years agoUse ZEND_NUM_ARGS() macro instead of custom variable
George Peter Banyard [Thu, 2 Apr 2020 16:43:57 +0000 (18:43 +0200)]
Use ZEND_NUM_ARGS() macro instead of custom variable

Also why on earth would someone do this?

4 years agoPromote empty string warning to ValueError in mb_ord()
George Peter Banyard [Thu, 2 Apr 2020 16:35:20 +0000 (18:35 +0200)]
Promote empty string warning to ValueError in mb_ord()

4 years agoMerge branch 'PHP-7.4'
Nikita Popov [Thu, 2 Apr 2020 14:34:51 +0000 (16:34 +0200)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Fixed bug #79434

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Thu, 2 Apr 2020 14:34:21 +0000 (16:34 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fixed bug #79434

4 years agoFixed bug #79434
Nikita Popov [Thu, 2 Apr 2020 14:32:57 +0000 (16:32 +0200)]
Fixed bug #79434

4 years agoMerge branch 'PHP-7.4'
Matteo Beccati [Thu, 2 Apr 2020 14:17:24 +0000 (16:17 +0200)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Skip fpm tests not designed to be run as root
  Allow fpm tests to be run with long socket path

4 years agoSkip fpm tests not designed to be run as root
Matteo Beccati [Wed, 1 Apr 2020 16:28:34 +0000 (18:28 +0200)]
Skip fpm tests not designed to be run as root

When running as root with TEST_FPM_RUN_AS_ROOT=1

4 years agoAllow fpm tests to be run with long socket path
Matteo Beccati [Wed, 1 Apr 2020 16:14:25 +0000 (18:14 +0200)]
Allow fpm tests to be run with long socket path

Socket path is restricted to ~100 bytes, so we can use
the system temp dir if the path ends up too long.

4 years agonews / UPGRADING for zip 1.19.0
Remi Collet [Thu, 2 Apr 2020 12:58:13 +0000 (14:58 +0200)]
news / UPGRADING for zip 1.19.0

4 years ago- add ZipArchive::EM_UNKNOWN constant - add ZipArchive::EM_TRAD_PKWARE constant ...
Remi Collet [Thu, 2 Apr 2020 12:40:05 +0000 (14:40 +0200)]
- add ZipArchive::EM_UNKNOWN constant - add ZipArchive::EM_TRAD_PKWARE constant - cleanup hack for libzip 1.3.1 (have only exist for a few days) - add ZipArchive::isCompressionMethodSupported() method (libzip 1.7.0) - add ZipArchive::isEncryptionMethodSupported() method (libzip 1.7.0) - bump version to 1.19.0-dev

4 years agoFix #47983: mixed LF and CRLF line endings in mail()
Christoph M. Becker [Thu, 2 Apr 2020 11:06:19 +0000 (13:06 +0200)]
Fix #47983: mixed LF and CRLF line endings in mail()

Email headers are supposed to be separated with CRLF.  Period.

4 years agoPrevent imap mail tests from borking instead of skipping
Christoph M. Becker [Thu, 2 Apr 2020 10:50:38 +0000 (12:50 +0200)]
Prevent imap mail tests from borking instead of skipping

As of commit e49593a[1], run-tests.php is rather picky regarding the
output of SKIPIF sections, so we have to suppress warnings for failing
imap_open().

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

4 years agouse a better setter for zip_error_t
Remi Collet [Thu, 2 Apr 2020 10:26:34 +0000 (12:26 +0200)]
use a better setter for zip_error_t

4 years agoRemove <default> prefix from reflection dump
Nikita Popov [Thu, 2 Apr 2020 09:25:41 +0000 (11:25 +0200)]
Remove <default> prefix from reflection dump

This really doesn't add anything, and only makes for confusing
terminology. Only marking properties as dynamic is sufficient.

4 years agoDisplay property default value in reflection dumps
Nikita Popov [Thu, 2 Apr 2020 09:21:48 +0000 (11:21 +0200)]
Display property default value in reflection dumps

4 years agoShow property type in reflection export
Nikita Popov [Thu, 2 Apr 2020 09:05:04 +0000 (11:05 +0200)]
Show property type in reflection export

4 years agoAvoid control flow warning
Nikita Popov [Thu, 2 Apr 2020 08:54:32 +0000 (10:54 +0200)]
Avoid control flow warning

4 years agoMerge branch 'PHP-7.4'
Christoph M. Becker [Wed, 1 Apr 2020 17:21:46 +0000 (19:21 +0200)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Enable error diagnostic for check_default_conf_path.phpt

4 years agoEnable error diagnostic for check_default_conf_path.phpt
Christoph M. Becker [Wed, 1 Apr 2020 17:20:35 +0000 (19:20 +0200)]
Enable error diagnostic for check_default_conf_path.phpt

Otherwise we have no clue why the test failed, if the regex didn't
match.

4 years agoRemove unnecessary check in runtime_compile_time_binary_operands.phpt
Nikita Popov [Wed, 1 Apr 2020 12:49:52 +0000 (14:49 +0200)]
Remove unnecessary check in runtime_compile_time_binary_operands.phpt

Now that operator errors are detected more accurately, we no longer
have any cases where we throw a compile-time error instead of a
run-time exception, so we can drop this check now.

4 years agoMake division by zero error check more accurate
Nikita Popov [Wed, 1 Apr 2020 12:47:21 +0000 (14:47 +0200)]
Make division by zero error check more accurate

For division (rather than modulus) we should check the double
value, otherwise the result might be zero after integer truncation,
but not zero as a floating point value.

4 years agoUnify checks for binary operator errors for ct eval
Nikita Popov [Wed, 1 Apr 2020 11:02:58 +0000 (13:02 +0200)]
Unify checks for binary operator errors for ct eval

Move everything into one function and share it with opcache.
This fixes some discrepancies.