Answer the question
In order to leave comments, you need to log in
Parsing methods in classes, PHP?
Need to parse n number of php files with classes, getting the names of public methods
Help me write a regular expression
so that from this:
class Text
{
public function getName(...)
{
return $name;
}
public static function export(...)
{
return 'alalla';
}
}
$array = [
"getName", "static export"
];
Answer the question
In order to leave comments, you need to log in
php.net/manual/ru/reflectionclass.getmethods.php
Well, you will bring the resulting array to your own form in trivial ways.
The main thing is that regular expressions are not needed here :)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question