note 106104 added to reflectionclass.getdefaultproperties

From: Date: Mon, 10 Oct 2011 23:54:35 +0000
Subject: note 106104 added to reflectionclass.getdefaultproperties
Groups: php.notes 
Request: Send a blank email to php-notes+get-183776@lists.php.net to get a copy of this message
To correct post above and accentuate main advantages over get_class_vars and get_object_vars: 1. In contrast to both get_class_vars and get_object_vars, this method does not depends on scope. No need to have following method within class: public static function expose() { echo format(get_class_vars(__CLASS__)); } 2. As opposed to get_object_vars, it does show static properties. Disadvantages: 1.) Does not show private properties of a parent class. 2.) In a case, if both, child and parent have same properties names, only child properties will be displayed. Anyway, 'the issue' can be solved by using following function: http://en.php.net/manual/en/reflectionclass.getparentclass.php ---- Server IP: 212.126.36.70 Probable Submitter: 89.101.60.23 ---- Manual Page -- http://www.php.net/manual/en/reflectionclass.getdefaultproperties.php Edit -- https://master.php.net/note/edit/106104 Del: integrated -- https://master.php.net/note/delete/106104/integrated Del: useless -- https://master.php.net/note/delete/106104/useless Del: bad code -- https://master.php.net/note/delete/106104/bad+code Del: spam -- https://master.php.net/note/delete/106104/spam Del: non-english -- https://master.php.net/note/delete/106104/non-english Del: in docs -- https://master.php.net/note/delete/106104/in+docs Del: other reasons-- https://master.php.net/note/delete/106104 Reject -- https://master.php.net/note/reject/106104 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#183776) next »