Skip to content

sync #11

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 76 commits into from
Nov 21, 2021
Merged

sync #11

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
7967875
[ci skip] Update NEWS
smalyshev Nov 15, 2021
6f38acf
Safely reassign array in usort()
nikic Nov 16, 2021
2d14ec9
Merge branch 'PHP-8.0' into PHP-8.1
nikic Nov 16, 2021
8a28ab6
Merge branch 'PHP-8.1'
nikic Nov 16, 2021
18a0d46
Safely reassign array in usort()
nikic Nov 16, 2021
1c25c55
Merge branch 'PHP-7.4' into PHP-8.0
nikic Nov 16, 2021
3bea159
Merge branch 'PHP-8.0' into PHP-8.1
nikic Nov 16, 2021
172d469
Merge branch 'PHP-8.1'
nikic Nov 16, 2021
d26965b
Fixed bug #81626
nikic Nov 16, 2021
9e25c4b
Merge branch 'PHP-7.4' into PHP-8.0
nikic Nov 16, 2021
9e5bddd
Merge branch 'PHP-8.0' into PHP-8.1
nikic Nov 16, 2021
4027c11
Merge branch 'PHP-8.1'
nikic Nov 16, 2021
d14a913
[ci skip] Fix news entry for bug #79971
cmb69 Nov 16, 2021
8a20764
[ci skip] Merge branch 'PHP-7.3' into PHP-7.4
cmb69 Nov 16, 2021
b963208
[ci skip] Merge branch 'PHP-7.4' into PHP-8.0
cmb69 Nov 16, 2021
1641e29
[ci skip] Merge branch 'PHP-8.0' into PHP-8.1
cmb69 Nov 16, 2021
cdcbd6e
[ci skip] Merge branch 'PHP-8.1'
cmb69 Nov 16, 2021
7d92153
7.3.34 might be next
cmb69 Nov 16, 2021
be1cb5a
[ci skip] Merge branch 'PHP-7.3' into PHP-7.4
cmb69 Nov 16, 2021
8689248
[ci skip] Merge branch 'PHP-7.4' into PHP-8.0
cmb69 Nov 16, 2021
25b0906
[ci skip] Merge branch 'PHP-8.0' into PHP-8.1
cmb69 Nov 16, 2021
c400e6d
[ci skip] Merge branch 'PHP-8.1'
cmb69 Nov 16, 2021
d9ff09a
Extract code for reporting a zend_fetch_class() error
nikic Nov 16, 2021
812df2b
Fix bug #81611
camporter Nov 12, 2021
f51eb15
Merge branch 'PHP-8.1'
nikic Nov 16, 2021
c02aa46
Fix leak when persistent PDO connection fails
nikic Nov 16, 2021
a4da60f
Merge branch 'PHP-8.1'
nikic Nov 16, 2021
fb3e646
OpenBSD ZTS build fix
devnexen Nov 16, 2021
0040571
Merge branch 'PHP-8.0' into PHP-8.1
nikic Nov 17, 2021
372df2d
Merge branch 'PHP-8.1'
nikic Nov 17, 2021
48a65fe
JIT: Fixed memory lieak
dstogov Nov 17, 2021
42ccf93
Merge branch 'PHP-8.0' into PHP-8.1
dstogov Nov 17, 2021
f34a3d3
Merge branch 'PHP-8.1'
dstogov Nov 17, 2021
20fb26e
Add more specific array return type hints for various extensions - pa…
kocsismate Aug 30, 2021
baac970
Add the --generate-optimizer-info option to the help of gen_stub.php
kocsismate Nov 17, 2021
d608319
Merge branch 'PHP-8.1'
kocsismate Nov 17, 2021
fac78ee
JIT: Fixed memory leak
dstogov Nov 17, 2021
61b432c
Merge branch 'PHP-8.0' into PHP-8.1
dstogov Nov 17, 2021
a9db6e7
Merge branch 'PHP-8.1'
dstogov Nov 17, 2021
44e5d25
Fix inheritance of class constants if mutable data used
nikic Nov 16, 2021
24485aa
Merge branch 'PHP-8.1'
nikic Nov 17, 2021
d0ecc83
Assert hash is known when we claim it is
nikic Nov 17, 2021
6641e3b
Fix bug #81630: Don't claim known hash in getTraitAliases()
nikic Nov 17, 2021
aaba000
Merge branch 'PHP-8.1'
nikic Nov 17, 2021
4d4fe76
Fixed bug #81631
nikic Nov 17, 2021
70cb372
Merge branch 'PHP-8.0' into PHP-8.1
nikic Nov 17, 2021
976f569
Merge branch 'PHP-8.1'
nikic Nov 17, 2021
76548e5
Fixed bug #81607 (CE_CACHE allocation with concurrent access)
dstogov Nov 17, 2021
d56ec0a
Merge branch 'PHP-8.1'
dstogov Nov 17, 2021
9dd3e8b
JIT: Fixed memory leak in Zend/tests/concat_002.phpt introduced by fa…
dstogov Nov 17, 2021
8965d6b
Merge branch 'PHP-8.0' into PHP-8.1
dstogov Nov 17, 2021
11b2cff
Merge branch 'PHP-8.1'
dstogov Nov 17, 2021
a8b9dbc
Fix ZEND_HASH_REVERSE_FOREACH_PTR definition
bwoebi Nov 17, 2021
279d6a4
Skip test under preloading
nikic Nov 18, 2021
6e98203
Merge branch 'PHP-8.1'
nikic Nov 18, 2021
bc6ec0a
Clarify that preg_match_all() cannot return null
nikic Nov 18, 2021
3ec55d6
Merge branch 'PHP-8.0' into PHP-8.1
nikic Nov 18, 2021
2791afb
Merge branch 'PHP-8.1'
nikic Nov 18, 2021
17ceed9
Implement __serialize() and __unserialize() on GMP
nikic Nov 18, 2021
f29a409
Merge branch 'PHP-8.1'
nikic Nov 18, 2021
e81ad63
Update reflection test after stub change
nikic Nov 18, 2021
36d2d27
Merge branch 'PHP-8.0' into PHP-8.1
nikic Nov 18, 2021
3ded2db
Merge branch 'PHP-8.1'
nikic Nov 18, 2021
5ab2749
Fixed a crash becaeuse of race condition in inheritance cache
dstogov Nov 18, 2021
0e1c724
Merge branch 'PHP-8.1'
dstogov Nov 18, 2021
1845b71
Remove commented code in pass1
nikic Nov 18, 2021
e4679ef
Fixed date/diff where the difference in hour is less than 1
derickr Nov 18, 2021
f893b55
Merge branch 'PHP-8.1'
derickr Nov 18, 2021
fc67967
Increase script sleep in FPM process idle test
bukka Oct 5, 2021
2f8407f
Increase read timeout in FPM process idle test
bukka Nov 14, 2021
79f0e48
Merge branch 'PHP-8.0' into PHP-8.1
bukka Nov 20, 2021
636e54a
Merge branch 'PHP-8.1'
bukka Nov 20, 2021
b6419f9
Micro-optimizations for WeakMap
TysonAndre Nov 20, 2021
241bd3f
Fix use after free when WeakMap is modified during field write
TysonAndre Nov 20, 2021
e8283ee
Merge branch 'PHP-8.0' into PHP-8.1
TysonAndre Nov 20, 2021
90c16db
Merge branch 'PHP-8.1'
TysonAndre Nov 20, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions TSRM/TSRM.c
Original file line number Diff line number Diff line change
Expand Up @@ -729,13 +729,13 @@ TSRM_API size_t tsrm_get_ls_cache_tcb_offset(void)
#if defined(__APPLE__) && defined(__x86_64__)
// TODO: Implement support for fast JIT ZTS code ???
return 0;
#elif defined(__x86_64__) && defined(__GNUC__) && !defined(__FreeBSD__)
#elif defined(__x86_64__) && defined(__GNUC__) && !defined(__FreeBSD__) && !defined(__OpenBSD__)
size_t ret;

asm ("movq _tsrm_ls_cache@gottpoff(%%rip),%0"
: "=r" (ret));
return ret;
#elif defined(__i386__) && defined(__GNUC__) && !defined(__FreeBSD__)
#elif defined(__i386__) && defined(__GNUC__) && !defined(__FreeBSD__) && !defined(__OpenBSD__)
size_t ret;

asm ("leal _tsrm_ls_cache@ntpoff,%0"
Expand Down
47 changes: 0 additions & 47 deletions Zend/Optimizer/pass1.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
* - constant expression evaluation
* - optimize constant conditional JMPs
* - pre-evaluate constant function calls
* - eliminate FETCH $GLOBALS followed by FETCH_DIM/UNSET_DIM/ISSET_ISEMPTY_DIM
*/

#include "php.h"
Expand Down Expand Up @@ -531,52 +530,6 @@ void zend_optimizer_pass1(zend_op_array *op_array, zend_optimizer_ctx *ctx)
zend_optimizer_collect_constant(ctx, &ZEND_OP1_LITERAL(opline), &ZEND_OP2_LITERAL(opline));
}
break;
#if 0
/* see ext/opcache/tests/bug78961.phpt */
// case ZEND_FETCH_R:
case ZEND_FETCH_W:
// case ZEND_FETCH_RW:
case ZEND_FETCH_IS:
// case ZEND_FETCH_FUNC_ARG:
case ZEND_FETCH_UNSET:
/* convert FETCH $GLOBALS (global), FETCH_DIM $x into FETCH $x (global) */
if ((opline->extended_value & ZEND_FETCH_GLOBAL) != 0 &&
opline->op1_type == IS_CONST &&
Z_TYPE(ZEND_OP1_LITERAL(opline)) == IS_STRING &&
zend_string_equals_literal(Z_STR(ZEND_OP1_LITERAL(opline)), "GLOBALS") &&
((opline + 1)->opcode == opline->opcode + 1 ||
((opline + 1)->opcode == ZEND_UNSET_DIM &&
opline->opcode == ZEND_FETCH_UNSET) ||
((opline + 1)->opcode == ZEND_ISSET_ISEMPTY_DIM_OBJ &&
opline->opcode == ZEND_FETCH_IS)) &&
(opline + 1)->op1_type == opline->result_type &&
(opline + 1)->op1.var == opline->result.var &&
((opline + 1)->op2_type != IS_CONST ||
Z_TYPE(ZEND_OP2_LITERAL(opline + 1)) < IS_ARRAY)) {

if ((opline + 1)->opcode == ZEND_UNSET_DIM) {
(opline + 1)->opcode = ZEND_UNSET_VAR;
(opline + 1)->extended_value = ZEND_FETCH_GLOBAL;
} else if ((opline + 1)->opcode == ZEND_ISSET_ISEMPTY_DIM_OBJ) {
(opline + 1)->opcode = ZEND_ISSET_ISEMPTY_VAR;
(opline + 1)->extended_value |= ZEND_FETCH_GLOBAL;
} else {
(opline + 1)->opcode = opline->opcode;
(opline + 1)->extended_value = ZEND_FETCH_GLOBAL;
}
(opline + 1)->op1_type = (opline + 1)->op2_type;
(opline + 1)->op1 = (opline + 1)->op2;
if ((opline + 1)->op1_type == IS_CONST &&
Z_TYPE(ZEND_OP1_LITERAL(opline + 1)) != IS_STRING) {

convert_to_string(&ZEND_OP1_LITERAL(opline + 1));
zend_string_hash_val(Z_STR(ZEND_OP1_LITERAL(opline + 1)));
}
SET_UNUSED((opline + 1)->op2);
MAKE_NOP(opline);
}
break;
#endif

case ZEND_JMPZ_EX:
case ZEND_JMPNZ_EX:
Expand Down
15 changes: 15 additions & 0 deletions Zend/Optimizer/zend_func_infos.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,10 @@ static const func_info_t func_infos[] = {
F1("filter_input_array", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_LONG|MAY_BE_ARRAY_KEY_STRING|MAY_BE_ARRAY_OF_ANY|MAY_BE_ARRAY_OF_REF|MAY_BE_FALSE|MAY_BE_NULL),
F1("filter_var_array", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_LONG|MAY_BE_ARRAY_KEY_STRING|MAY_BE_ARRAY_OF_ANY|MAY_BE_ARRAY_OF_REF|MAY_BE_FALSE|MAY_BE_NULL),
F1("filter_list", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_LONG|MAY_BE_ARRAY_OF_STRING),
F1("ftp_raw", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_LONG|MAY_BE_ARRAY_OF_STRING|MAY_BE_NULL),
F1("ftp_nlist", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_LONG|MAY_BE_ARRAY_OF_STRING|MAY_BE_FALSE),
F1("ftp_rawlist", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_LONG|MAY_BE_ARRAY_OF_STRING|MAY_BE_FALSE),
F1("ftp_mlsd", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_LONG|MAY_BE_ARRAY_OF_ARRAY|MAY_BE_FALSE),
F1("gd_info", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_STRING|MAY_BE_ARRAY_OF_STRING|MAY_BE_ARRAY_OF_FALSE|MAY_BE_ARRAY_OF_TRUE),
F1("imagecreatetruecolor", MAY_BE_OBJECT|MAY_BE_FALSE),
#if defined(PHP_WIN32)
Expand Down Expand Up @@ -163,6 +167,10 @@ static const func_info_t func_infos[] = {
#if defined(HAVE_BIND_TEXTDOMAIN_CODESET)
F1("bind_textdomain_codeset", MAY_BE_STRING|MAY_BE_FALSE),
#endif
F1("gmp_div_qr", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_LONG|MAY_BE_ARRAY_OF_OBJECT),
F1("gmp_sqrtrem", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_LONG|MAY_BE_ARRAY_OF_OBJECT),
F1("gmp_rootrem", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_LONG|MAY_BE_ARRAY_OF_OBJECT),
F1("gmp_gcdext", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_STRING|MAY_BE_ARRAY_OF_OBJECT),
F1("hash", MAY_BE_STRING|MAY_BE_FALSE),
F1("hash_file", MAY_BE_STRING|MAY_BE_FALSE),
F1("hash_hmac", MAY_BE_STRING|MAY_BE_FALSE),
Expand All @@ -189,6 +197,13 @@ static const func_info_t func_infos[] = {
F1("iconv_mime_decode_headers", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_STRING|MAY_BE_ARRAY_OF_STRING|MAY_BE_ARRAY_OF_ARRAY|MAY_BE_FALSE),
F1("iconv", MAY_BE_STRING|MAY_BE_FALSE),
F1("iconv_get_encoding", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_STRING|MAY_BE_ARRAY_OF_STRING|MAY_BE_STRING|MAY_BE_FALSE),
F1("intlcal_get_available_locales", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_LONG|MAY_BE_ARRAY_OF_STRING),
F1("datefmt_localtime", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_STRING|MAY_BE_ARRAY_OF_LONG|MAY_BE_FALSE),
F1("locale_get_keywords", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_STRING|MAY_BE_ARRAY_OF_STRING|MAY_BE_FALSE|MAY_BE_NULL),
F1("msgfmt_parse", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_LONG|MAY_BE_ARRAY_OF_LONG|MAY_BE_ARRAY_OF_DOUBLE|MAY_BE_ARRAY_OF_STRING|MAY_BE_FALSE),
F1("msgfmt_parse_message", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_LONG|MAY_BE_ARRAY_OF_LONG|MAY_BE_ARRAY_OF_DOUBLE|MAY_BE_ARRAY_OF_STRING|MAY_BE_FALSE),
F1("resourcebundle_locales", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_LONG|MAY_BE_ARRAY_OF_STRING|MAY_BE_FALSE),
F1("transliterator_list_ids", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_LONG|MAY_BE_ARRAY_OF_STRING|MAY_BE_FALSE),
F1("json_encode", MAY_BE_STRING|MAY_BE_FALSE),
F1("json_last_error_msg", MAY_BE_STRING),
F1("ldap_get_entries", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_LONG|MAY_BE_ARRAY_KEY_STRING|MAY_BE_ARRAY_OF_LONG|MAY_BE_ARRAY_OF_ARRAY|MAY_BE_FALSE),
Expand Down
17 changes: 17 additions & 0 deletions Zend/tests/bug81626.phpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
--TEST--
Bug #81626: Error on use static:: in __сallStatic() wrapped to Closure::fromCallable()
--FILE--
<?php
class TestClass {
public static bool $wasCalled = false;
public static function __callStatic(string $name, array $args): string
{
static::$wasCalled = true;
return 'ok';
}
}
$closure = Closure::fromCallable([TestClass::class, 'foo']);
var_dump($closure());
?>
--EXPECT--
string(2) "ok"
14 changes: 14 additions & 0 deletions Zend/tests/bug81631.phpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
--TEST--
Bug #81631: ::class with dynamic class name may yield wrong line number
--FILE--
<?php
$a = 0;
var_dump($b::class);
?>
--EXPECTF--
Warning: Undefined variable $b in %s on line 3

Fatal error: Uncaught TypeError: Cannot use "::class" on value of type null in %s:3
Stack trace:
#0 {main}
thrown in %s on line 3
39 changes: 39 additions & 0 deletions Zend/tests/class_constant_inheritance_mutable_data.phpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
--TEST--
Class constant inheritance with mutable data
--SKIPIF--
<?php
if (getenv('SKIP_PRELOAD')) die('skip preload produces additional warnings');
?>
--FILE--
<?php

// This would previously leak under opcache.
class A {
const X = 'X' . self::Y;
const Y = 'Y';
}
interface I {
const X2 = 'X2' . self::Y2;
const Y2 = 'Y2';
}
eval('class B extends A implements I {}');
var_dump(new B);
var_dump(B::X, B::X2);

// This should only produce one warning, not two.
class X {
const C = 1 % 1.5;
}
class Y extends X {
}
var_dump(X::C, Y::C);
?>
--EXPECTF--
object(B)#1 (0) {
}
string(2) "XY"
string(4) "X2Y2"

Deprecated: Implicit conversion from float 1.5 to int loses precision in %s on line %d
int(0)
int(0)
116 changes: 116 additions & 0 deletions Zend/tests/weakrefs/weakrefs_006.phpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
--TEST--
WeakReference overwriting existing value
--FILE--
<?php

class HasDtor {
public function __destruct() {
echo "In destruct\n";
global $w, $all;
for ($i = 0; $i < 10; $i++) {
$v = new stdClass();
$all[] = $v;
$w[$v] = $i;
}
}
}
$all = [];
$w = new WeakMap();
$o = new stdClass();

$w[$o] = new HasDtor();
$w[$o] = 123;
var_dump($w);
?>
--EXPECT--
In destruct
object(WeakMap)#1 (11) {
[0]=>
array(2) {
["key"]=>
object(stdClass)#2 (0) {
}
["value"]=>
int(123)
}
[1]=>
array(2) {
["key"]=>
object(stdClass)#4 (0) {
}
["value"]=>
int(0)
}
[2]=>
array(2) {
["key"]=>
object(stdClass)#5 (0) {
}
["value"]=>
int(1)
}
[3]=>
array(2) {
["key"]=>
object(stdClass)#6 (0) {
}
["value"]=>
int(2)
}
[4]=>
array(2) {
["key"]=>
object(stdClass)#7 (0) {
}
["value"]=>
int(3)
}
[5]=>
array(2) {
["key"]=>
object(stdClass)#8 (0) {
}
["value"]=>
int(4)
}
[6]=>
array(2) {
["key"]=>
object(stdClass)#9 (0) {
}
["value"]=>
int(5)
}
[7]=>
array(2) {
["key"]=>
object(stdClass)#10 (0) {
}
["value"]=>
int(6)
}
[8]=>
array(2) {
["key"]=>
object(stdClass)#11 (0) {
}
["value"]=>
int(7)
}
[9]=>
array(2) {
["key"]=>
object(stdClass)#12 (0) {
}
["value"]=>
int(8)
}
[10]=>
array(2) {
["key"]=>
object(stdClass)#13 (0) {
}
["value"]=>
int(9)
}
}
29 changes: 23 additions & 6 deletions Zend/zend_API.c
Original file line number Diff line number Diff line change
Expand Up @@ -1325,12 +1325,19 @@ ZEND_API HashTable *zend_separate_class_constants_table(zend_class_entry *class_
zend_hash_extend(constants_table, zend_hash_num_elements(&class_type->constants_table), 0);

ZEND_HASH_MAP_FOREACH_STR_KEY_PTR(&class_type->constants_table, key, c) {
if (Z_TYPE(c->value) == IS_CONSTANT_AST) {
new_c = zend_arena_alloc(&CG(arena), sizeof(zend_class_constant));
memcpy(new_c, c, sizeof(zend_class_constant));
c = new_c;
if (c->ce == class_type) {
if (Z_TYPE(c->value) == IS_CONSTANT_AST) {
new_c = zend_arena_alloc(&CG(arena), sizeof(zend_class_constant));
memcpy(new_c, c, sizeof(zend_class_constant));
c = new_c;
}
Z_TRY_ADDREF(c->value);
} else {
if (Z_TYPE(c->value) == IS_CONSTANT_AST) {
c = zend_hash_find_ptr(CE_CONSTANTS_TABLE(c->ce), key);
ZEND_ASSERT(c);
}
}
Z_TRY_ADDREF(c->value);
_zend_hash_append_ptr(constants_table, key, c);
} ZEND_HASH_FOREACH_END();

Expand Down Expand Up @@ -1412,8 +1419,18 @@ ZEND_API zend_result zend_update_class_constants(zend_class_entry *class_type) /
} else {
constants_table = &class_type->constants_table;
}
ZEND_HASH_MAP_FOREACH_PTR(constants_table, c) {

zend_string *name;
ZEND_HASH_MAP_FOREACH_STR_KEY_VAL(constants_table, name, val) {
c = Z_PTR_P(val);
if (Z_TYPE(c->value) == IS_CONSTANT_AST) {
if (c->ce != class_type) {
Z_PTR_P(val) = c = zend_hash_find_ptr(CE_CONSTANTS_TABLE(c->ce), name);
if (Z_TYPE(c->value) != IS_CONSTANT_AST) {
continue;
}
}

val = &c->value;
if (UNEXPECTED(zval_update_constant_ex(val, c->ce) != SUCCESS)) {
return FAILURE;
Expand Down
2 changes: 1 addition & 1 deletion Zend/zend_ast.c
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ static zend_result zend_ast_add_unpacked_element(zval *result, zval *expr) {

zend_class_entry *zend_ast_fetch_class(zend_ast *ast, zend_class_entry *scope)
{
return zend_fetch_class(zend_ast_get_str(ast), ast->attr | ZEND_FETCH_CLASS_EXCEPTION);
return zend_fetch_class_with_scope(zend_ast_get_str(ast), ast->attr | ZEND_FETCH_CLASS_EXCEPTION, scope);
}

ZEND_API zend_result ZEND_FASTCALL zend_ast_evaluate(zval *result, zend_ast *ast, zend_class_entry *scope)
Expand Down
1 change: 1 addition & 0 deletions Zend/zend_execute.h
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,7 @@ ZEND_API void zend_set_timeout(zend_long seconds, bool reset_signals);
ZEND_API void zend_unset_timeout(void);
ZEND_API ZEND_NORETURN void ZEND_FASTCALL zend_timeout(void);
ZEND_API zend_class_entry *zend_fetch_class(zend_string *class_name, int fetch_type);
ZEND_API zend_class_entry *zend_fetch_class_with_scope(zend_string *class_name, int fetch_type, zend_class_entry *scope);
ZEND_API zend_class_entry *zend_fetch_class_by_name(zend_string *class_name, zend_string *lcname, int fetch_type);

ZEND_API zend_function * ZEND_FASTCALL zend_fetch_function(zend_string *name);
Expand Down
Loading