15 lines
249 B
Plaintext
15 lines
249 B
Plaintext
|
|
--TEST--
|
||
|
|
GH-18373: Don't substitute self/parent with anonymous class
|
||
|
|
--FILE--
|
||
|
|
<?php
|
||
|
|
|
||
|
|
$o = new class() {
|
||
|
|
public function test(): self {}
|
||
|
|
};
|
||
|
|
|
||
|
|
echo (new ReflectionClass($o))->getMethod('test')->getReturnType()->getName(), "\n";
|
||
|
|
|
||
|
|
?>
|
||
|
|
--EXPECT--
|
||
|
|
self
|