I want to get the actual programming code text from a specific function in a file.
For example, I want to get the code inside __construct(){}
inside the class called Example
in ExampleClass.php
. How can I do that?
Is regex the best way to do this or is there a better way?