主页
PHP
PHP 魔术常量
tryphp_const_trait
运行 ❯
×
更改方向
保存代码
更改主题
<?php trait message1 { public function msg1() { echo __TRAIT__; } } class Welcome { use message1; } $obj = new Welcome(); $obj->msg1(); ?>
message1