get_object_vars(\(var) vs array(\)var) test case class Test { public function actionGetObjectVarsVsArrayCast() { $obj = new TestA(); println(get_object_vars($obj)); println((array) $obj); } } class TestA { public $public = 1; protected $protected = 2…
<?php /** */ //get_object_vars($obj) 获得对象的属性,以关联数据形式返回. /*class study{ public $name; public $age; public $city; function __construct($name,$age,$city) { $this->name=$name; $this->age=$age; $this->city=$city; } public function say(){ echo "…