1
0
mirror of https://github.com/php/php-src.git synced 2026-04-29 11:13:36 +02:00
Files
Ilija Tovilo 6497c6c455 Don't substitute self/parent with anonymous class
Fixes GH-18373
Closes GH-19537
2025-08-25 17:08:29 +02:00

15 lines
249 B
PHP

--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