<?php
abstract class Base {
public static function foo() {
return 'Base';
}
}
trait T {
public static function foo() {
return 'T';
}
}
class Foo extends Base {
use T;
}
echo Foo::foo();
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
T
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; Foo has a deprecated constructor in /in/dtd8Q on line 15
T