1--TEST-- 2Return type of self is not allowed in function 3--FILE-- 4<?php 5 6function test(): self {} 7?> 8--EXPECTF-- 9Fatal error: Cannot use "self" when no class scope is active in %s on line 3 10