<?php
trait TA {
function foo() {}
}
trait TB {
function foo() {}
}
trait TC {
function foo() {}
}
class C {
use TA, TB, TC {
TB::foo insteadof TB;
}
}
$c = new C;
$c->foo();
$c->bar();
$c->baz();
Fatal error: Inconsistent insteadof definition. The method foo is to be used from TB, but TB is also on the exclude list in /in/fCSWR on line 15
Process exited with code 255.
Output for 8.3.5
Warning: PHP Startup: Unable to load dynamic library 'sodium.so' (tried: /usr/lib/php/8.3.5/modules/sodium.so (libsodium.so.23: cannot open shared object file: No such file or directory), /usr/lib/php/8.3.5/modules/sodium.so.so (/usr/lib/php/8.3.5/modules/sodium.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
Fatal error: Inconsistent insteadof definition. The method foo is to be used from TB, but TB is also on the exclude list in /in/fCSWR on line 15
Process exited with code 255.
Output for 5.5.0 - 5.5.38, 5.6.0 - 5.6.40
Fatal error: Inconsistent insteadof definition. The method foo is to be used from TB, but TB is also on the exclude list in /in/fCSWR on line 19
Process exited with code 255.