Get PHP function body as string

This piece of code can return the method body from a class

When to use:

Extract the function details & execute in other another class when the function contains self::func();

Eg:

In class B, we need to call function a from Class A