I wanna catch Php classes from a file:
class a {
function test() { }
}
class b extends a {
function test() { }
}
and the result matches must be
class a {
function test() { }
}
and
class b extends a {
function test() { }
}
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
regexps are poor at parsing programming languages’ grammars. Consider tokenizer functions instead. e.g. http://php.net/manual/en/function.token-get-all.php
see also this http://framework.zend.com/apidoc/core/Zend_Reflection/Zend_Reflection_File.html