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