note 79240 added to function.get-class-vars

From: Date: Fri, 16 Nov 2007 17:18:38 +0000
Subject: note 79240 added to function.get-class-vars
Groups: php.notes 
Request: Send a blank email to php-notes+get-132357@lists.php.net to get a copy of this message
There seems to be be a function to get constants missing , i.e. get_class_constants() ... so here is a simple function for you all. Hopefully Zend will include this in the next round as a native php call, without using reflection. <?php function GetClassConstants($sClassName) { $oClass = new ReflectionClass($sClassName); return $oClass->getConstants()); } ?> ---- Server IP: 209.41.74.194 Probable Submitter: 24.6.119.182 ---- Manual Page -- http://www.php.net/manual/en/function.get-class-vars.php Edit -- https://master.php.net/note/edit/79240 Del: integrated -- https://master.php.net/note/delete/79240/integrated Del: useless -- https://master.php.net/note/delete/79240/useless Del: bad code -- https://master.php.net/note/delete/79240/bad+code Del: spam -- https://master.php.net/note/delete/79240/spam Del: non-english -- https://master.php.net/note/delete/79240/non-english Del: in docs -- https://master.php.net/note/delete/79240/in+docs Del: other reasons-- https://master.php.net/note/delete/79240 Reject -- https://master.php.net/note/reject/79240 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#132357) next »