php的帮助文档,涉及到PHP的案例和基本语法,以及实际应用内容

源代码在线查看: function.get-object-vars.html

软件大小: 3633 K
上传用户: fengkuangyidao
关键词: php PHP 文档 实际应用
下载地址: 免注册下载 普通下载 VIP

相关代码

												 				  Gets the public properties of the given object				  				 				 				 get_declared_interfaces				 get_parent_class				 Classes/Object Functions				 PHP Manual								 				  get_object_vars				  (PHP 4, PHP 5)get_object_vars — Gets the public properties of the given object								 				 				  Description				  				   array get_object_vars				    ( object $object				   )								  				   Gets the accessible non-static properties of the given 				   object				 according to scope.				  				 								 				  Parameters				  				   								    								     object												     								      				       An object instance.				      				     								    								   								  				 								 				  Return Values				  				   Returns an associative array of defined object accessible non-static properties 				   for the specified object				 in scope. If a property have 				   not been assigned a value, it will be returned with a NULL value.				  				 								 				  ChangeLog				  				   				    								     				      				       Version				       Description				      								     								     				      				       prior to 4.2.0				       				        If the variables declared in the class of which the				        object				 is an instance, have not been assigned a				        value, those will not be returned in the array				       				      								     				    								   				  				 								 				  Examples				  				   				    Example #1 Use of get_object_vars()				    								<?phpclass foo {    private $a;    public $b = 1;    public $c;    private $d;    static $e;       public function test() {        var_dump(get_object_vars($this));    }}$test = new foo;var_dump(get_object_vars($test));$test->test();?>												    								    The above example will output:				    								array(2) {				  ["b"]=>				  int(1)				  ["c"]=>				  NULL				}				array(4) {				  ["a"]=>				  NULL				  ["b"]=>				  int(1)				  ["c"]=>				  NULL				  ["d"]=>				  NULL				}								    				   				  				 								 				  See Also				  				   				    get_class_methods()				    get_class_vars()				   				  				 												 get_declared_interfaces				 get_parent_class				 Classes/Object Functions				 PHP Manual											

相关资源