一.获取静态方法调用者的类名 方法一: class foo { static public function test() { var_dump(get_called_class()); } } class bar extends foo { } foo::test(); bar::test(); 输出: string(3) "foo" string(3) "bar" 方法二: class Bar { public static function test() {…
object eg: var o = { a : 2, b : 3 }; console.log(o); console.log(typeof o); console.log(o.a.toFixed(2)); ==> var o = new Object(); o.a = 2; o.b = 3; console.log(o); console.log(typeof o); console.log(o.a.toFixed(2)); eg: var person = { name: “张三”, ag…