--TEST-- GH-13177 (PHP 8.3.2: final private constructor not allowed when used in trait) --FILE-- getMethod("__construct"), "\n"; } class Foo5 extends Foo3 { private function __construct() {} } ?> --EXPECTF-- Warning: Private methods cannot be final as they are never overridden by other classes in %s on line %d Method [ final private method __construct ] { @@ %sgh13177.php 4 - 4 } Method [ final private method __construct ] { @@ %sgh13177.php 4 - 4 } Method [ final private method __construct ] { @@ %sgh13177.php 4 - 4 } Method [ final private method __construct ] { @@ %sgh13177.php 24 - 24 } Fatal error: Cannot override final method Foo3::__construct() in %s on line %d