1//Simple
2$vFn = "Login";
3$vFn();
4
5//OR
6call_user_func($vFn, $vars); //Returns the return value of the callback.
7
8//Best
9abstract class mBase {
10 public function main() {
11 .....
12 }
13}
14
15class mA extends mBase {
16 public function main() {
17 parent->main();
18 .....
19 }
20}
21
22class mB extends mBase {
23 public function main() {
24 parent->main();
25 .....
26 }
27}
28function runMM(mBase $module) {
29 $module->main();
30}
31$m = 'mB'; //example
32runMM ($m);
1$function = $prefix . '_custom_type_init';
2if(function_exists($function)) {
3 $function();
4}