php dynamic function call
public function view_all($building_post_id, $member_id = array());
//
$this->view_all($building_post_id); // CORRECT, no need pass default params
$this->view_all($building_post_id, 12); // CORRECT, pass default params
php dynamic function call
public function view_all($building_post_id, $member_id = array());
//
$this->view_all($building_post_id); // CORRECT, no need pass default params
$this->view_all($building_post_id, 12); // CORRECT, pass default params
php call dynamic function
//Simple
$vFn = "Login";
$vFn();
//OR
call_user_func($vFn, $vars); //Returns the return value of the callback.
//Best
abstract class mBase {
public function main() {
.....
}
}
class mA extends mBase {
public function main() {
parent->main();
.....
}
}
class mB extends mBase {
public function main() {
parent->main();
.....
}
}
function runMM(mBase $module) {
$module->main();
}
$m = 'mB'; //example
runMM ($m);
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us