3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface I { public int $i { get; } } class C1 implements I { public int $i; } trait T1 { public int $i; } class C2 implements I { use T1; } class C3 implements I { use T1; public int $i; } /** Fatal error: C4 and T1 define the same hooked property ($i) in the composition of C4. Conflict resolution between hooked properties is currently not supported. Class was composed in /in/tKvrA on line 27 class C4 implements I { use T1; public int $i { get => 123; } } */ trait T2 { public int $i { get => 456; } } /** Fatal error: C5 and T2 define the same hooked property ($i) in the composition of C5. Conflict resolution between hooked properties is currently not supported. Class was composed in /in/3fjVL on line 41 class C5 implements I { use T2; public int $i; } */ class C6 implements I { use T2; public int $i { get => 456; } }
Output for rfc.property-hooks
Fatal error: C6 and T2 define the same hooked property ($i) in the composition of C6. Conflict resolution between hooked properties is currently not supported. Class was composed in /in/i6bDu on line 47
Process exited with code 255.

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
141.51 ms | 1398 KiB | 8 Q