3v4l.org

run code in 500+ PHP versions simultaneously
<?php trait ExpectsFooProperty { abstract public string $foo { get; } } trait ProvidesFooProperty { use ExpectsFooProperty; public readonly string $foo; } final readonly class FooPropertyImpl { use ProvidesFooProperty; }
Output for 8.4.6 - 8.4.10
Fatal error: ProvidesFooProperty and ExpectsFooProperty define the same hooked property ($foo) in the composition of ProvidesFooProperty. Conflict resolution between hooked properties is currently not supported. Class was composed in /in/tM9i5 on line 8
Process exited with code 255.
Output for 8.3.5
Fatal error: Cannot use the abstract modifier on a property in /in/tM9i5 on line 5
Process exited with code 255.

preferences:
39.44 ms | 498 KiB | 3 Q