1--TEST-- 2GH-10377 (Unable to have an anonymous readonly class) - usage variation: dynamic properties attribute 3--FILE-- 4<?php 5 6$readonly_anon = new #[AllowDynamicProperties] readonly class { 7 public int $field; 8 function __construct() { 9 $this->field = 2; 10 } 11}; 12 13?> 14--EXPECTF-- 15Fatal error: Cannot apply #[AllowDynamicProperties] to readonly class class@anonymous in %s on line %d 16