<?php
trait Foo { use Foo { ff as abc; } public function a() { return 'sf';} public function ff() { return '2424';}}
class Bar {use Foo; }
class An extends Bar { use Foo; public $var; }
var_dump((new An())->abc());
Fatal error: Trait "Foo" not found in /in/f3P99 on line 2
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: Trait "Foo" not found in /in/f3P99 on line 2
Process exited with code 255.
Output for 7.4.0 - 7.4.33
Fatal error: Trait 'Foo' not found in /in/f3P99 on line 2
Process exited with code 255.
Fatal error: Trait method ff has not been applied, because there are collisions with other trait methods on Bar in /in/f3P99 on line 4
Process exited with code 255.