You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<?php
#[AllowDynamicProperties]
enum Example {
case MyCase;
}
$c = Example::MyCase;
$c->prop = 'foo';
Resulted in this output:
Fatal error: Uncaught Error: Cannot create dynamic property Example::$prop in /in/Aqipu:9
Stack trace:
#0 {main}
thrown in /in/Aqipu on line 9
Process exited with code 255.
But I expected this output instead:
Fatal error: Cannot apply #[AllowDynamicProperties] to enum in /in/Aqipu on line 4
Process exited with code 255.