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

前端 未结 6 1861
轻奢々
轻奢々 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:15

    Why not use __autoload() function?

    http://www.php.net/autoload

    then you just instantiate object when needed.

提交回复
热议问题