Skip to content

Commit df45149

Browse files
committed
Merge remote-tracking branch 'php/master' into perf/remaining-tls-globals
# Conflicts: # UPGRADING.INTERNALS
2 parents 25056b0 + 919991e commit df45149

351 files changed

Lines changed: 7555 additions & 2225 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/scripts/download-bundled/jit-ir.sh‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ cd "$(dirname "$0")/../../.."
55
tmp_dir=/tmp/php-src-download-bundled/jit-ir
66
rm -rf "$tmp_dir"
77

8-
revision=4a1208ccbfc8ca32a5103baf9820ad3cbb6ff06e
8+
revision=281a66a87aedc4444ca09f696b9b8e9dab89ad32
99

1010
git clone --depth 1 --revision="$revision" https://github.com/dstogov/ir.git "$tmp_dir"
1111

‎.github/workflows/test-suite.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ jobs:
230230
fail-fast: false
231231
matrix: ${{ fromJson(inputs.branch).jobs.LINUX_X32.matrix }}
232232
name: "LINUX_X32_${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}"
233-
runs-on: ubuntu-latest
233+
runs-on: ubuntu-24.04
234234
timeout-minutes: 180
235235
container:
236236
image: ubuntu:${{ fromJson(inputs.branch).config.ubuntu_version }}
@@ -901,7 +901,7 @@ jobs:
901901
timeout-minutes: 50
902902
steps:
903903
- name: git checkout
904-
uses: actions/checkout@v5
904+
uses: actions/checkout@v7
905905
with:
906906
ref: ${{ fromJson(inputs.branch).ref }}
907907
- name: Solaris

‎NEWS‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,16 @@ PHP NEWS
2020
. Use recommended TYPE, HELP order for OpenMetrics metadata.
2121
(Marcel Hernandez)
2222

23+
- GD:
24+
. Fixed imagecolormatch() and imagejpeg() ValueError messages. (lacatoire)
25+
2326
- Hash:
2427
. Fixed mhash_keygen_s2k() truncating a $length above INT_MAX instead of
2528
throwing a ValueError. (Marc Bennewitz)
2629

2730
- Intl:
31+
. Added Spoofchecker::getRestrictionLevel(). (Weilin Du)
32+
. Added Collator::getRules() and collator_get_rules(). (Weilin Du)
2833
. Added IntlRelativeDateTimeFormatter for locale-aware relative date and time
2934
formatting, with enums for styles, capitalization contexts, and units.
3035
(Weilin Du)
@@ -110,6 +115,10 @@ PHP NEWS
110115
- PGSQL:
111116
. Fixed pg_lo_write() rejecting data containing null bytes. (Ilia Alshanetsky)
112117

118+
- phpdbg:
119+
. Fixed bug GH-13230 (use-after-free at phpdbg shutdown).
120+
(Kamil Tekiela, Ilia Alshanetsky)
121+
113122
- Posix:
114123
. Reverted the validity check on the flags argument of posix_access().
115124
(David Carlier)
@@ -160,6 +169,8 @@ PHP NEWS
160169
rmdir(), touch(), chmod() or stat(). (Ilia Alshanetsky)
161170

162171
- Standard:
172+
. Fixed bug GH-25387 (Uploaded files leak in request_parse_body()).
173+
(Kévin Dunglas)
163174
. Fixed quoted_printable_decode() truncating input at NUL bytes. (Weilin Du)
164175
. Fixed version_compare() silently truncating version strings at NUL bytes by
165176
rejecting such input. (Weilin Du)
@@ -189,6 +200,11 @@ PHP NEWS
189200
especially UTF-8. (Nicolas Grekas)
190201
. Improved performance of htmlspecialchars() when nothing needs encoding.
191202
(Nicolas Grekas)
203+
. bindec(), octdec(), hexdec() and base_convert() now throw an Exception
204+
when the passed string contains characters that are invalid for the
205+
specified number base. (Sjoerd Langkemper)
206+
. Improved performance of in_array() and array_search() in strict mode when
207+
searching for a string. (Alexander Danilov)
192208

193209
- URI:
194210
. Fix casing of enum cases in UriHostType and UrlHostType to match the RFC

‎UPGRADING‎

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ PHP 8.7 UPGRADE NOTES
2828
converted to an int.
2929
. Nested arrays in CURLOPT_POSTFIELDS now throw a TypeError, instead of being
3030
silently converted to the string "Array".
31+
. Negative values for CURLOPT_POSTREDIR are now rejected, making
32+
curl_setopt() return false, instead of being silently interpreted as a
33+
combination of redirect types.
3134

3235
- PDO:
3336
. PDOStatement::bindColumn() now throws a ValueError when the column name is
@@ -57,6 +60,9 @@ PHP 8.7 UPGRADE NOTES
5760
application terminate one attribute and append further ones.
5861

5962
- Standard:
63+
. bindec(), octdec(), hexdec() and base_convert() now throw an Exception
64+
when the passed string contains characters that are invalid for the
65+
specified number base.
6066
. The number of filters that can be chained in a php://filter URL is limited
6167
to 16 by default. Set the stream context option max_filter_count to change
6268
this.
@@ -68,6 +74,8 @@ PHP 8.7 UPGRADE NOTES
6874
- Curl:
6975
. Multiple files can now be uploaded with the same field name by passing an
7076
array of CURLFile or CURLStringFile objects to CURLOPT_POSTFIELDS.
77+
. Support for upstream options CURLOPT_ECH, CURLOPT_HAPROXY_CLIENT_IP, and
78+
CURLOPT_SERVER_RESPONSE_TIMEOUT_MS.
7179

7280
- Intl:
7381
. Added IntlRelativeDateTimeFormatter to format relative date and time offsets
@@ -121,6 +129,13 @@ PHP 8.7 UPGRADE NOTES
121129
. Added Transliterator::toRules() and transliterator_to_rules() to export
122130
rules that can be used to recreate a transliterator. The optional
123131
$escapeUnprintable argument escapes unprintable characters when true.
132+
. Added Collator::getRules() and collator_get_rules() to retrieve collation
133+
tailoring rules as a UTF-8 string. These describe locale-specific adjustments
134+
to the root collation order; the full root/UCA rules are not included. An
135+
empty string is returned if no tailoring rules are available, or false if
136+
the rules cannot be converted to UTF-8.
137+
. Added Spoofchecker::getRestrictionLevel() to retrieve the configured
138+
restriction level as one of the Spoofchecker restriction level constants.
124139

125140
========================================
126141
7. New Classes and Interfaces
@@ -154,6 +169,12 @@ PHP 8.7 UPGRADE NOTES
154169
10. New Global Constants
155170
========================================
156171

172+
- Curl:
173+
. New options: CURLOPT_ECH, CURLOPT_HAPROXY_CLIENT_IP,
174+
CURLOPT_SERVER_RESPONSE_TIMEOUT_MS.
175+
. CURLOPT_MAIL_RCPT_ALLOWFAILS is the correctly spelled alternative to
176+
CURLOPT_MAIL_RCPT_ALLLOWFAILS.
177+
157178
========================================
158179
11. Changes to INI File Handling
159180
========================================
@@ -198,6 +219,8 @@ PHP 8.7 UPGRADE NOTES
198219
UTF-8.
199220
. htmlspecialchars() returns its input without copying it when nothing needs
200221
encoding.
222+
. Improved performance of in_array() and array_search() in strict mode when
223+
searching for a string.
201224

202225
- MBString:
203226
. Improved performance of mb_strlen for UTF-8 strings.

‎UPGRADING.INTERNALS‎

Lines changed: 63 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -14,50 +14,65 @@ PHP 8.7 INTERNALS UPGRADE NOTES
1414
1. Internal API changes
1515
========================
1616

17-
- Removed the ZEND_LOG_XOR() macro.
18-
- Removed the ZEND_TRUTH() macro.
19-
- Removed zend_execute_scripts(). Manually call zend_execute_script() in a loop
20-
instead.
21-
- Removed ZEND_STATIC_ASSERT(). Use C11 static_assert() directly instead.
22-
- Removed zend_atomic.h and the zend_atomic_* types and functions.
23-
Use the standard C11 atomic_* types and functions instead.
24-
- The sapi_terminate_process() function was removed.
25-
- The sapi_force_http_10() function was removed.
26-
- The sapi_get_fd() function was removed.
27-
- The sapi_get_target_uid() and sapi_get_target_gid() functions were removed.
28-
- Removed HAVE_NORETURN and HAVE_NORETURN_ALIAS. ZEND_NORETURN is guaranteed to
29-
work.
30-
- Redefined ZEND_NORETURN to make use of the [[noreturn]] attribute for C++
31-
and C23, which means that ZEND_NORETURN needs to come first in the modifier
32-
list. Consider using noreturn (C11) / [[noreturn]] (C23) directly if
33-
header interoperability is not required.
34-
- The signature of zend_is_callable() has been changed to
35-
zend_is_callable(const zval *callable, zend_fcall_info_cache *fcc, char **error)
36-
from zend_is_callable(const zval *callable, uint32_t check_flags, zend_string **callable_name).
37-
This new signature covers the most common parameters used with zend_is_callable_ex().
38-
- Removed zend_hrtime_posix_clock_id. zend_hrtime() always uses CLOCK_MONOTONIC
39-
on POSIX platforms.
40-
- Function pointer signature for interface_gets_implemented has been made void.
41-
Implementations are expected to use zend_error_noreturn upon failure.
42-
- Added a new zend_object_copy() function which increases the refcount of
43-
a zend_object* and returns it. Allowing more descriptive code rather than
44-
doing an assignment followed by GC_ADDREF().
45-
- Added zend_call_method_if_exists_ex() which accepts named parameters and
46-
retrieving the callability failure error message.
47-
- The INIT_CLASS_ENTRY_INIT_METHODS() macro, which was previously used as
48-
part of handling disabled classes, was removed following the removal of
49-
the `disable_classes` INI setting in PHP 8.5.
50-
- Using zend_array_destroy() on HashTables with a custom pDestructor is not
51-
allowed anymore. User-facing HashTables must have pDestructor = ZVAL_PTR_DTOR
52-
or NULL, and must be freed with zend_array_destroy(). Other HashTables can be
53-
freed with zend_hash_destroy() + pefree().
54-
- CG(), EG(), PG(), SG(), CWDG(), SIGG(), ZCG(), JIT_G() and INI_SCNG() use
55-
native TLS in ZTS builds. The compiler_globals_offset, executor_globals_offset,
56-
core_globals_offset, sapi_globals_offset, cwd_globals_offset,
57-
zend_signal_globals_offset, accel_globals_offset, jit_globals_offset and
58-
ini_scanner_globals_offset symbols have been removed.
59-
- php_reserve_tsrm_memory() has been removed.
60-
- Removed zend_error_noreturn_unchecked().
17+
- Breaking changes:
18+
. Added zend_module_entry.child_init_func, an optional void callback invoked
19+
by php_child_init() in the child process after core child initialization.
20+
It runs in module dependency order for started modules and may run before a
21+
request starts or during an active request. Initialize it with a designated
22+
initializer such as `.child_init_func = callback` after
23+
STANDARD_MODULE_PROPERTIES_EX.
24+
. Function pointer signature for interface_gets_implemented has been made
25+
void. Implementations are expected to use zend_error_noreturn upon failure.
26+
. Redefined ZEND_NORETURN to make use of the [[noreturn]] attribute for C++
27+
and C23, which means that ZEND_NORETURN needs to come first in the modifier
28+
list. Consider using noreturn (C11) / [[noreturn]] (C23) directly if
29+
header interoperability is not required.
30+
. Using zend_array_destroy() on HashTables with a custom pDestructor is not
31+
allowed anymore. User-facing HashTables must have pDestructor = ZVAL_PTR_DTOR
32+
or NULL, and must be freed with zend_array_destroy(). Other HashTables can
33+
be freed with zend_hash_destroy() + pefree().
34+
35+
- Removed:
36+
. The ZEND_LOG_XOR() macro was removed.
37+
. The ZEND_TRUTH() macro was removed.
38+
. Removed zend_execute_scripts(). Manually call zend_execute_script() in a
39+
loop instead.
40+
. Removed ZEND_STATIC_ASSERT(). Use C11 static_assert() directly instead.
41+
. Removed zend_atomic.h and the zend_atomic_* types and functions.
42+
Use the standard C11 atomic_* types and functions instead.
43+
. The zend_error_noreturn_unchecked() function was removed.
44+
. The sapi_terminate_process() function was removed.
45+
. The sapi_force_http_10() function was removed.
46+
. The sapi_get_fd() function was removed.
47+
. The sapi_get_target_uid() function was removed.
48+
. The sapi_get_target_gid() function was removed.
49+
. Removed zend_hrtime_posix_clock_id. zend_hrtime() always uses
50+
CLOCK_MONOTONIC on POSIX platforms.
51+
. The INIT_CLASS_ENTRY_INIT_METHODS() macro, which was previously used as
52+
part of handling disabled classes, was removed following the removal of
53+
the `disable_classes` INI setting in PHP 8.5.
54+
. Removed HAVE_NORETURN and HAVE_NORETURN_ALIAS. ZEND_NORETURN is guaranteed
55+
to work.
56+
. CG(), EG(), PG(), SG(), CWDG(), SIGG(), ZCG(), JIT_G() and INI_SCNG() use
57+
native TLS in ZTS builds. The compiler_globals_offset, executor_globals_offset,
58+
core_globals_offset, sapi_globals_offset, cwd_globals_offset,
59+
zend_signal_globals_offset, accel_globals_offset, jit_globals_offset and
60+
ini_scanner_globals_offset symbols have been removed.
61+
. php_reserve_tsrm_memory() has been removed.
62+
63+
- Changed:
64+
. The signature of zend_is_callable() has been changed to
65+
zend_is_callable(const zval *callable, zend_fcall_info_cache *fcc, char **error)
66+
from zend_is_callable(const zval *callable, uint32_t check_flags, zend_string **callable_name).
67+
This new signature covers the most common parameters used with
68+
zend_is_callable_ex().
69+
70+
- Added:
71+
. The zend_object_copy() function was added to increases the refcount of a
72+
zend_object* and returns it. Allowing more descriptive code rather than
73+
doing an assignment followed by GC_ADDREF().
74+
. The zend_call_method_if_exists_ex() was added to accepts named parameters
75+
and retrieving the callability failure error message.
6176

6277
========================
6378
2. Build system changes
@@ -95,6 +110,10 @@ PHP 8.7 INTERNALS UPGRADE NOTES
95110
- Standard:
96111
. php_explode() now takes a HashTable* instead of a zval* to store the
97112
resulting parts. It already expected the zval* to be IS_ARRAY.
113+
. _php_math_basetozval() now returns zend_result instead of void. It throws
114+
an exception and returns FAILURE if the input contains invalid characters
115+
for the given base.
116+
. php_dl() has been removed, use php_load_extension() instead.
98117

99118
========================
100119
4. OpCode changes

‎Zend/Optimizer/sccp.c‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -765,9 +765,6 @@ static inline zend_result ct_eval_array_key_exists(zval *result, const zval *op1
765765
if (Z_TYPE_P(op2) != IS_ARRAY && !IS_PARTIAL_ARRAY(op2)) {
766766
return FAILURE;
767767
}
768-
if (Z_TYPE_P(op1) != IS_STRING && Z_TYPE_P(op1) != IS_LONG && Z_TYPE_P(op1) != IS_NULL) {
769-
return FAILURE;
770-
}
771768
if (fetch_array_elem(&value, op2, op1) == FAILURE) {
772769
return FAILURE;
773770
}

‎Zend/Optimizer/zend_dump.c‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ static void zend_dump_unused_op(const zend_op *opline, znode_op op, uint32_t fla
156156
ZEND_API void zend_dump_var(const zend_op_array *op_array, uint8_t var_type, uint32_t var_num)
157157
{
158158
if (var_type == IS_CV && var_num < op_array->last_var) {
159-
fprintf(stderr, "CV%d($%s)", var_num, op_array->vars[var_num]->val);
159+
fprintf(stderr, "CV%d($%s)", var_num, ZSTR_VAL(op_array->vars[var_num]));
160160
} else if (var_type == IS_VAR) {
161161
fprintf(stderr, "V%d", var_num);
162162
} else if ((var_type & (IS_VAR|IS_TMP_VAR)) == IS_TMP_VAR) {
@@ -223,9 +223,9 @@ static void zend_dump_type_info(uint32_t info, const zend_class_entry *ce, bool
223223
fprintf(stderr, "class");
224224
if (ce) {
225225
if (is_instanceof) {
226-
fprintf(stderr, " (instanceof %s)", ce->name->val);
226+
fprintf(stderr, " (instanceof %s)", ZSTR_VAL(ce->name));
227227
} else {
228-
fprintf(stderr, " (%s)", ce->name->val);
228+
fprintf(stderr, " (%s)", ZSTR_VAL(ce->name));
229229
}
230230
}
231231
} else if ((info & MAY_BE_ANY) == MAY_BE_ANY) {
@@ -358,9 +358,9 @@ static void zend_dump_type_info(uint32_t info, const zend_class_entry *ce, bool
358358
fprintf(stderr, "object");
359359
if (ce) {
360360
if (is_instanceof) {
361-
fprintf(stderr, " (instanceof %s)", ce->name->val);
361+
fprintf(stderr, " (instanceof %s)", ZSTR_VAL(ce->name));
362362
} else {
363-
fprintf(stderr, " (%s)", ce->name->val);
363+
fprintf(stderr, " (%s)", ZSTR_VAL(ce->name));
364364
}
365365
}
366366
}
@@ -931,9 +931,9 @@ void zend_dump_op_array_name(const zend_op_array *op_array)
931931
{
932932
if (op_array->function_name) {
933933
if (op_array->scope && op_array->scope->name) {
934-
fprintf(stderr, "%s::%s", op_array->scope->name->val, op_array->function_name->val);
934+
fprintf(stderr, "%s::%s", ZSTR_VAL(op_array->scope->name), ZSTR_VAL(op_array->function_name));
935935
} else {
936-
fprintf(stderr, "%s", op_array->function_name->val);
936+
fprintf(stderr, "%s", ZSTR_VAL(op_array->function_name));
937937
}
938938
} else {
939939
fprintf(stderr, "%s", "$_main");
@@ -1017,7 +1017,7 @@ ZEND_API void zend_dump_op_array(const zend_op_array *op_array, uint32_t dump_fl
10171017
if (msg) {
10181018
fprintf(stderr, " ; (%s)\n", msg);
10191019
}
1020-
fprintf(stderr, " ; %s:%u-%u\n", op_array->filename->val, op_array->line_start, op_array->line_end);
1020+
fprintf(stderr, " ; %s:%u-%u\n", ZSTR_VAL(op_array->filename), op_array->line_start, op_array->line_end);
10211021

10221022
if (func_info) {
10231023
fprintf(stderr, " ; return ");

‎Zend/Optimizer/zend_inference.c‎

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4938,6 +4938,9 @@ ZEND_API zend_result zend_ssa_inference(zend_arena **arena, const zend_op_array
49384938
}
49394939
/* }}} */
49404940

4941+
/* Key types whose conversion to an array offset may emit a diagnostic */
4942+
#define MAY_BE_THROWING_KEY (MAY_BE_NULL|MAY_BE_DOUBLE|MAY_BE_ARRAY|MAY_BE_OBJECT|MAY_BE_RESOURCE)
4943+
49414944
ZEND_API bool zend_may_throw_ex(const zend_op *opline, const zend_ssa_op *ssa_op, const zend_op_array *op_array, const zend_ssa *ssa, uint32_t t1, uint32_t t2)
49424945
{
49434946
if (opline->op1_type == IS_CV) {
@@ -5220,7 +5223,7 @@ ZEND_API bool zend_may_throw_ex(const zend_op *opline, const zend_ssa_op *ssa_op
52205223
return 1;
52215224
}
52225225
return (t1 & (MAY_BE_OBJECT|MAY_BE_RESOURCE|MAY_BE_TRUE|MAY_BE_FALSE|MAY_BE_STRING|MAY_BE_LONG|MAY_BE_DOUBLE)) || opline->op2_type == IS_UNUSED ||
5223-
(t2 & (MAY_BE_UNDEF|MAY_BE_ARRAY|MAY_BE_OBJECT|MAY_BE_RESOURCE));
5226+
(t2 & (MAY_BE_UNDEF|MAY_BE_THROWING_KEY));
52245227
case ZEND_ASSIGN_OBJ:
52255228
if (t1 & (MAY_BE_ANY-MAY_BE_OBJECT)) {
52265229
return 1;
@@ -5285,9 +5288,9 @@ ZEND_API bool zend_may_throw_ex(const zend_op *opline, const zend_ssa_op *ssa_op
52855288
case ZEND_ROPE_END:
52865289
return t2 & (MAY_BE_ARRAY|MAY_BE_OBJECT);
52875290
case ZEND_INIT_ARRAY:
5288-
return (opline->op2_type != IS_UNUSED) && (t2 & (MAY_BE_ARRAY|MAY_BE_OBJECT|MAY_BE_RESOURCE));
5291+
return (opline->op2_type != IS_UNUSED) && (t2 & MAY_BE_THROWING_KEY);
52895292
case ZEND_ADD_ARRAY_ELEMENT:
5290-
return (opline->op2_type == IS_UNUSED) || (t2 & (MAY_BE_NULL|MAY_BE_ARRAY|MAY_BE_OBJECT|MAY_BE_RESOURCE));
5293+
return (opline->op2_type == IS_UNUSED) || (t2 & MAY_BE_THROWING_KEY);
52915294
case ZEND_STRLEN:
52925295
return (t1 & MAY_BE_ANY) != MAY_BE_STRING;
52935296
case ZEND_COUNT:
@@ -5314,9 +5317,11 @@ ZEND_API bool zend_may_throw_ex(const zend_op *opline, const zend_ssa_op *ssa_op
53145317
case ZEND_FETCH_IS:
53155318
return (t2 & (MAY_BE_ARRAY|MAY_BE_OBJECT));
53165319
case ZEND_ISSET_ISEMPTY_DIM_OBJ:
5317-
return (t1 & MAY_BE_OBJECT) || (t2 & (MAY_BE_DOUBLE|MAY_BE_ARRAY|MAY_BE_OBJECT));
5320+
return (t1 & MAY_BE_OBJECT) || (t2 & MAY_BE_THROWING_KEY);
53185321
case ZEND_FETCH_DIM_IS:
5319-
return (t1 & MAY_BE_OBJECT) || (t2 & (MAY_BE_DOUBLE|MAY_BE_ARRAY|MAY_BE_OBJECT|MAY_BE_RESOURCE));
5322+
return (t1 & MAY_BE_OBJECT) || (t2 & MAY_BE_THROWING_KEY)
5323+
/* "Illegal string offset" warning for leading-numeric string offsets */
5324+
|| ((t1 & MAY_BE_STRING) && (t2 & MAY_BE_STRING));
53205325
case ZEND_CAST:
53215326
switch (opline->extended_value) {
53225327
case IS_LONG:
@@ -5338,7 +5343,7 @@ ZEND_API bool zend_may_throw_ex(const zend_op *opline, const zend_ssa_op *ssa_op
53385343
if ((t2 & MAY_BE_ANY) != MAY_BE_ARRAY) {
53395344
return 1;
53405345
}
5341-
if ((t1 & (MAY_BE_ARRAY|MAY_BE_OBJECT|MAY_BE_RESOURCE))) {
5346+
if (t1 & MAY_BE_THROWING_KEY) {
53425347
return 1;
53435348
}
53445349
return 0;
@@ -5363,7 +5368,7 @@ ZEND_API bool zend_may_throw_ex(const zend_op *opline, const zend_ssa_op *ssa_op
53635368
if (t1 & (MAY_BE_FALSE|MAY_BE_TRUE|MAY_BE_LONG|MAY_BE_DOUBLE|MAY_BE_STRING|MAY_BE_OBJECT|MAY_BE_RESOURCE|MAY_BE_REF)) {
53645369
return 1;
53655370
}
5366-
if (t2 & (MAY_BE_RESOURCE|MAY_BE_ARRAY|MAY_BE_OBJECT)) {
5371+
if (t2 & MAY_BE_THROWING_KEY) {
53675372
return 1;
53685373
}
53695374
if (opline->op2_type == IS_UNUSED) {
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
--TEST--
2+
Anonymous class name is not truncated in the abstract method list
3+
--FILE--
4+
<?php
5+
new class { abstract public $p { get; } };
6+
?>
7+
--EXPECTF--
8+
Fatal error: Class class@anonymous%0%s must implement 1 abstract method (class@anonymous%0%s::$p::get) in %s on line %d

0 commit comments

Comments
 (0)