I have below regex to match all function statements in any php
file. But it matches the function definitions as well.
[a-zA-Z]+\([^\)]*\)(\.[^\)]*\))?
Now I need to modify this regex to match only function calls(not definition/declaration) that are called like $this->funcName(
or $anyObject->funcName(
or self::funcName(
or parent::funcName(
.
I tried modifying the regex, but it breaks when I use $
in it. Can someone help out ?