如果我在PHP中有一个实例,那么获取该实例的静态属性('类变量')的最简单方法是什么?
这个
$classvars=get_class_vars(get_class($thing));
$property=$classvars['property'];
Run Code Online (Sandbox Code Playgroud)
声音真的太过分了.我期待
$thing::property
Run Code Online (Sandbox Code Playgroud)
要么
$thing->property
Run Code Online (Sandbox Code Playgroud) public function up() {
Schema::create('table', function (Blueprint $table) {
$table->bigIncrements('id'); $table->timestamps();
});
}
Run Code Online (Sandbox Code Playgroud)