php - Check if a class exist in a file -
i want create little function parameters : "class_name" , "file_name".
this function return "true" if class name given exists in file given else "false".
i not know how that.
use class_exists()
:
class_exists('class_name');
it check if class has been defined , return boolean
.
and function asking should mention how want , purpose.
update:
token_get_all(file_get_contents('index.php'));
will return tokens particular file. can check returned array class existance. token_get_all
Comments
Post a Comment