1--TEST-- 2Test that the ReturnTypeWillChange attribute cannot be used with functions 3--FILE-- 4<?php 5 6class Foo 7{ 8 #[ReturnTypeWillChange] 9 public int $bar; 10} 11 12?> 13--EXPECTF-- 14Fatal error: Attribute "ReturnTypeWillChange" cannot target property (allowed targets: method) in %s on line %d 15