Many of these now have reflection types,
making the old signatures redundant or inaccurate.
(Some methods also throw Errors instead of returning null/false)
Closes GH-4785.
preg_quote and curl_error now have a non-null return type of `string`.
zend_func_info now duplicates many real reflection types
(some of which are now non-null)
Closes GH-4788.
E.g. hash_equals is outdated - it has a non-null reflection type of bool.
Remove redundant signatures for types that are obviously not reference
counted (`F0`).
Closes GH-4787.
This is limited to types that aren't reference counted.
I assume the info that there is exactly one reference
should be preserved (e.g. for bcsqrt)
Closes GH-4786.
Some of these functions now have real reflection types
and will throw instead of return null/false.
Others provide the exact same reflection type information
that zend_func_info does. (or would after updating outdated types)
Closes GH-4790.
This is very similar to the existing mbstring.regex_stack_limit,
but for backtracking. The default value matches pcre.backtrack_limit.
Only used on libonig >= 2.8.0.
This originally manifested as a leak in oss-fuzz #18000. The following
is a reduced test case:
<?php
[
5 => 1,
"foo" > 1,
" " => "" == 0
];
<<<BAR
$x
BAR;
Because this particular error condition did not return T_ERROR,
EG(exception) was set while performing binary operation constant
evaluation, which checks exceptions for cast failures.
Instead of adding this indirect test case, I'm adding an assertion
that the lexer has to return T_ERROR if EG(exception) is set.
Print a more informative message that indicates that this is
likely a permission issue, and also indicate that pcre.jit=0
can be used to work around it.
Also automatically disable the JIT, so that this message is
only shown once.
See bug #78630.
I'm going for a very conservative fix here, where the previous
logic is restored for the case where an object is passed to
method_exists(). We might want to check against EG(scope) instead,
but this seems like a safer choice.
This means that behavior in PHP 7.4 changes only for
method_exists('C', 'privateMethodNotOnC'), which should be sensible.