Doubt about require_once for various classes

1

Is there any way to require multiple classes using just one require_once? I do not think I was doing a function and another question came up, does func_get_args return an array?

    
asked by anonymous 04.05.2018 / 21:09

1 answer

0

I did the test here and it worked.

Function:

function multipleRequire(){
$archives = func_get_args();
$c = func_num_args();

for ($i = 0;$i<$c;$i++){
    $name = ($archives[$i] . ".php");
    require_once("$name");
}

}

    
04.05.2018 / 21:09