File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -239,10 +239,9 @@ static zend_bool class_visible(zend_class_entry *ce) {
239
239
240
240
static zend_class_entry * lookup_class (
241
241
zend_class_entry * scope , zend_string * name , zend_bool register_unresolved ) {
242
- zend_class_entry * ce ;
242
+ uint32_t flags = ZEND_FETCH_CLASS_ALLOW_UNLINKED | ZEND_FETCH_CLASS_NO_AUTOLOAD ;
243
+ zend_class_entry * ce = zend_lookup_class_ex (name , NULL , flags );
243
244
if (!CG (in_compilation )) {
244
- uint32_t flags = ZEND_FETCH_CLASS_ALLOW_UNLINKED | ZEND_FETCH_CLASS_NO_AUTOLOAD ;
245
- ce = zend_lookup_class_ex (name , NULL , flags );
246
245
if (ce ) {
247
246
return ce ;
248
247
}
@@ -256,7 +255,6 @@ static zend_class_entry *lookup_class(
256
255
zend_hash_add_empty_element (CG (delayed_autoloads ), name );
257
256
}
258
257
} else {
259
- ce = zend_lookup_class_ex (name , NULL , ZEND_FETCH_CLASS_NO_AUTOLOAD );
260
258
if (ce && class_visible (ce )) {
261
259
return ce ;
262
260
}
Original file line number Diff line number Diff line change @@ -14,11 +14,13 @@ class C extends Z {
14
14
public function method ($ a ): self {}
15
15
public function method2 ($ a ): C {}
16
16
public function method3 ($ a ): object {}
17
+ public function method4 (D $ a ) {}
17
18
}
18
19
class D extends C {
19
20
public function method ($ a ): self {}
20
21
public function method2 ($ a ): D {}
21
22
public function method3 ($ a ): stdClass {}
23
+ public function method4 (C $ a ) {}
22
24
}
23
25
24
26
// Works.
You can’t perform that action at this time.
0 commit comments