php - Create an instance of an object inside a method - Stack Overflow

Posted by Unknown on Saturday, March 15, 2014

class Registry { /** * Array of objects */ private $objects; public function ... $class = 'Foo'; $foo = new $class;. is the same as $foo = new Foo;.

more

{ 0 comments... » php - Create an instance of an object inside a method - Stack Overflow read them below or add one }

Post a Comment

Popular Posts