note 50167 added to function.get-class-methods

From: Date: Sun, 20 Feb 2005 13:11:41 +0000
Subject: note 50167 added to function.get-class-methods
Groups: php.notes 
Request: Send a blank email to php-notes+get-85280@lists.php.net to get a copy of this message
In PHP4, if you need to get_class_methods in their original case. You can use this simple function I created. // Note: this function assumes that you only have 1 class in 1 file $file = "path/to/myclass.php" function file_get_class_methods ($file) { $arr = file($file); foreach ($arr as $line) { if (ereg ('function ([_A-Za-z0-9]+)', $line, $regs)) $arr_methods[] = $regs[1]; } return $arr_methods; } ---- Manual Page -- http://www.php.net/manual/en/function.get-class-methods.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+50167 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+50167&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+50167&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+50167&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+50167&report=yes&reason=useless Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+50167&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+50167&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#85280) next »