<?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;
}
}