How can I call a static method on a variable class?

前端 未结 6 1864
轻奢々
轻奢々 2020-12-15 15:44

I\'m trying to make some kind of function that loads and instantiates a class from a given variable. Something like this:



        
6条回答
  •  春和景丽
    2020-12-15 16:01

    Off the top of my head, needs testing, validation etc:

    newInstanceArgs();
                $GLOBALS[$className] = $classObj;
            }
        }
    
    ?>
    

提交回复
热议问题