1--TEST-- 2PHP 4 Constructors cannot declare a return type 3--FILE-- 4<?php 5 6class Foo { 7 function foo() : Foo {} 8} 9--EXPECTF-- 10Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; Foo has a deprecated constructor in %s on line %d 11 12Fatal error: Constructor %s::%s() cannot declare a return type in %s on line %s 13