note 10175 added to get_class_methods

From: Date: Sun, 17 Dec 2000 01:55:37 +0000
Subject: note 10175 added to get_class_methods
Groups: php.notes 
Request: Send a blank email to php-notes+get-8798@lists.php.net to get a copy of this message
This is example of get_class_method : /**** BEGIN OF CODE ****/ class xyz { var $x = 999; var $y = 123; function abc() { $this->$x = 0; } function abc1() { $this->$x = 1; } function abc2() { $this->$x = 2; } function abc3() { $this->$x = 3; } function abcx() { print $this->$x + $this->$y; } } $my_class = new xyz(); // print all methods of $my_class $arr = get_class_methods(get_class($my_class)); for ($i=0;$i<count($arr);$i++) print "Function $i : $arr[$i]\n"; /***** END OF CODE *****/ The result : Function 0 : abc Function 1 : abc1 Function 2 : abc2 Function 3 : abc3 Function 4 : abcx rgds, LexZEUS http://www.php.net/manual/function.get-class-methods.php

« previous php.notes (#8798) next »