Máté Kocsis
0ae8a3f3d6
Add stubs for SplHeap and SplPriorityQueue
...
Closes GH-5266
2020-03-16 12:04:56 +01:00
Philipp Tanlak
1668ad7cb1
Add str_contains() function
...
RFC: https://wiki.php.net/rfc/str_contains
Closes GH-5179.
2020-03-16 11:05:26 +01:00
Nikita Popov
934e60b594
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Don't specify ports in socket_export_stream-4.phpt
2020-03-16 10:32:39 +01:00
Nikita Popov
a57905dbac
Don't specify ports in socket_export_stream-4.phpt
...
Let the system pick a free port instead...
2020-03-16 10:32:04 +01:00
Christoph M. Becker
4c0ddd094a
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Fix typo in php.ini comment
2020-03-15 15:02:10 +01:00
Christoph M. Becker
b48c05a982
Merge branch 'PHP-7.3' into PHP-7.4
...
* PHP-7.3:
Fix typo in php.ini comment
2020-03-15 15:01:23 +01:00
Jacob Dreesen
68e2da6362
Fix typo in php.ini comment
2020-03-15 15:00:05 +01:00
Dmitry Stogov
9a8f735c57
Emit warning about type narrowing for tracing JIT as well
2020-03-14 01:29:46 +03:00
Dmitry Stogov
29bf7902b3
Fixed RC inference for ZEND_ASSIGN_STATIC_PROP and removed useless checks during RC inference
2020-03-14 01:17:45 +03:00
Dmitry Stogov
4bf2d09ede
Tracing JIT (it doesn't support register allocation yet)
...
Use opcache.jit=1255 to swith it on (the third digit 5 really matters)
Use opcache.jit_debug=0xff001 to see how it works and what code it generates
2020-03-13 22:11:07 +03:00
Nikita Popov
d15012d5e8
Accept const op_array in zend_build_call_map
2020-03-13 16:25:28 +01:00
Nikita Popov
9e89f91341
Add assertions for DIM_W/RW uses
...
The result should be used only once and on the directly next opline,
otherwise it may not be safe. Add some assertions to that effect.
2020-03-13 13:11:42 +01:00
Nikita Popov
9ab2cb923e
Also remove dead arguments
2020-03-13 12:45:02 +01:00
Nikita Popov
b979e03159
Remove dead type narrowing code
...
Rename handle_type_narrowing() to clarify what it does, and
remove dead code for resetting dependent vars.
2020-03-13 12:27:49 +01:00
Dmitry Stogov
78b64bd4ed
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Check asserts early
identation fix
Call global code of preloaded script in global context
Avoid "Anonymous class wasn't preloaded" error by lazely loading of not preloaded part of a preloaded script
2020-03-13 11:42:07 +03:00
Dmitry Stogov
c5159b3832
Check asserts early
2020-03-12 22:26:30 +03:00
Dmitry Stogov
b6492b4453
identation fix
2020-03-12 22:26:16 +03:00
Dmitry Stogov
3c6e9bed1a
Call global code of preloaded script in global context
2020-03-12 22:19:47 +03:00
George Peter Banyard
c9db32271a
Remove deprecated (real) cast
...
Closes GH-5220
2020-03-12 15:40:21 +01:00
Dmitry Stogov
2dddab01ae
Avoid "Anonymous class wasn't preloaded" error by lazely loading of not preloaded part of a preloaded script
2020-03-12 16:31:24 +03:00
Nikita Popov
0fdffc1807
Update Unicode tables to 13.0.0
2020-03-12 11:29:51 +01:00
Christoph M. Becker
b612559a5b
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Fix #79199 : curl_copy_handle() memory leak
2020-03-12 11:28:39 +01:00
Christoph M. Becker
ddc3f3d595
Merge branch 'PHP-7.3' into PHP-7.4
...
* PHP-7.3:
Fix #79199 : curl_copy_handle() memory leak
2020-03-12 11:27:45 +01:00
Christoph M. Becker
2b5fc8e325
Fix #79199 : curl_copy_handle() memory leak
...
`curl_copy_handle()` already registers a new resource, so we must not
increase the refcount of the original resource.
2020-03-12 11:23:53 +01:00
Christoph M. Becker
208e348982
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Fix #61597 : SXE properties may lack attributes and content
2020-03-12 10:57:14 +01:00
Christoph M. Becker
2b56735ea0
Merge branch 'PHP-7.3' into PHP-7.4
...
* PHP-7.3:
Fix #61597 : SXE properties may lack attributes and content
2020-03-12 10:56:13 +01:00
Christoph M. Becker
7c081db885
Fix #61597 : SXE properties may lack attributes and content
...
We must not treat a node as string if it has attributes, unless it is
an entity declaration which is always treated as string by simplexml.
2020-03-12 10:52:28 +01:00
Dmitry Stogov
10726588b1
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Export FFI::__BIGGEST_ALIGNMENT__
2020-03-12 11:45:05 +03:00
Dmitry Stogov
fee614f66b
Export FFI::__BIGGEST_ALIGNMENT__
2020-03-12 11:43:01 +03:00
Dmitry Stogov
c774ca8d80
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Allow to fetch function address
2020-03-12 11:41:12 +03:00
Dmitry Stogov
ecdaf83f5f
Allow to fetch function address
2020-03-12 11:40:48 +03:00
Xinchen Hui
583c7a4cbb
Merge branch 'PHP-7.4'
2020-03-12 15:45:07 +08:00
Xinchen Hui
22c83454d6
Folder mark missed
2020-03-12 15:43:15 +08:00
Dmitry Stogov
c45552e32b
Export FFI::__BIGGEST_ALIGNMENT__
2020-03-11 15:29:58 +03:00
Dmitry Stogov
e902e4acd9
Allow to fetch function address
2020-03-11 15:13:27 +03:00
Christoph M. Becker
f078bca729
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Fix #78210 : Invalid pointer address
2020-03-11 11:32:46 +01:00
Christoph M. Becker
8657f03084
Merge branch 'PHP-7.3' into PHP-7.4
...
* PHP-7.3:
Fix #78210 : Invalid pointer address
2020-03-11 11:31:26 +01:00
Christoph M. Becker
53797c206a
Fix #78210 : Invalid pointer address
...
This is actually about three distinct issues:
* If an empty string is passed as $address to `stream_socket_sendto()`,
the `sa` is not initialized, so we must not pass it as `addr` to
`php_stream_xport_sendto()`.
* On POSIX, `recvfrom()` truncates messages which are too long to fit
into the specified buffer (unless `MSG_PEEK` is given), discards the
excessive bytes, and returns the buffer length. On Windows, the same
happens, but `recvfrom()` returns `SOCKET_ERROR` with the error code
`WSAEMSGSIZE`. We have to catch this for best POSIX compatibility.
* In `php_network_parse_network_address_with_port()`, we have to zero
`in6` (not only its alias `sa`) to properly support IPv6.
Co-Authored-By: Nikita Popov <nikita.ppv@googlemail.com >
2020-03-11 11:30:15 +01:00
Christoph M. Becker
dcbf020f76
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Fix #79364 : When copy empty array, next key is unspecified
2020-03-11 08:57:17 +01:00
Christoph M. Becker
a72b261db5
Merge branch 'PHP-7.3' into PHP-7.4
...
* PHP-7.3:
Fix #79364 : When copy empty array, next key is unspecified
2020-03-11 08:55:28 +01:00
Christoph M. Becker
2462f2dab1
Fix #79364 : When copy empty array, next key is unspecified
...
We must not forget to keep the `nNextFreeElement` when duplicating
empty arrays.
2020-03-11 08:54:05 +01:00
Nikita Popov
f0f2493208
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Check for sys/auxv.h before using it.
2020-03-10 16:54:17 +01:00
Peter Seiderer
f73528f0e0
Check for sys/auxv.h before using it.
...
Fixes aarch64 compile with uclibc-ng (does not provide
sys/auxv.h header file).
Closes GH-5248.
Signed-off-by: Peter Seiderer <ps.report@gmx.net >
2020-03-10 16:53:57 +01:00
Nikita Popov
e8678fcb42
Fixed bug #75902
...
Don't special-case nested arrays/objects in str_replace(), instead
perform a string cast on them as well. For arrays, this will always
result in the usual conversion warning.
This behavior is consistent with preg_replace(). If we didn't want
to cast the array to string here, we should instead perform the
replacement recursively. Silently copying it is just confusing.
2020-03-10 16:49:17 +01:00
Nikita Popov
d9219f997d
Enable better trait conflict error message
...
I don't think there is any reason to disable this anymore,
at least all the messages generated in tests look correct and
more useful.
2020-03-10 16:19:11 +01:00
Nikita Popov
fff5771ccc
Require non-absolute trait method refs to be unambiguous
...
Currently, when writing something like
class X {
use T1, T2 {
func as otherFunc;
}
function func() {}
}
where both T1::func() and T2::func() exist, we will simply assume
that func refers to T1::func(). This is surprising, and it doesn't
really make sense that this particular method gets picked.
This commit validates that non-absolute method references are
unambiguous, i.e. refer to exactly one method. If there is
ambiguity, it is required to write T1::func as otherFunc or
similar.
Closes GH-5232.
2020-03-10 16:01:13 +01:00
Máté Kocsis
d2b902f174
Add some stubs for SPL
...
Closes GH-5245
2020-03-10 11:41:48 +01:00
Máté Kocsis
9d0eccd980
Perform some maintenance work on the XSL extension
...
Added stubs, fixed some ZPP, and changed PHP_FALIASes to PHP_METHODs.
Closes GH-5241
2020-03-10 11:41:15 +01:00
Christoph M. Becker
b31f73b1c8
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Enclose INI values containing {TMP} in quotes
2020-03-09 22:53:23 +01:00
Christoph M. Becker
fea2994ff8
Merge branch 'PHP-7.3' into PHP-7.4
...
* PHP-7.3:
Enclose INI values containing {TMP} in quotes
2020-03-09 22:51:11 +01:00