In PHP 5 can I instantiate a class dynamically?

前端 未结 4 486
予麋鹿
予麋鹿 2021-01-07 15:51

Is it possible to dynamically instantiate a class using a variable? For example is something like this possible in PHP?

class foo
{
    public $something;
}
         


        
4条回答
提交回复
热议问题