Yep, definitely.
$className="MyClass";
$object = new $className;
Related Contents:
- PHP check whether property exists in object or class
- PHP Fatal error: Using $this when not in object context
- How can I access an array/object?
- Get method’s arguments?
- PHP __PHP_Incomplete_Class Object with my $_SESSION data
- Can I instantiate a PHP class inside another class?
- When should I use ‘self’ over ‘$this’?
- Sort array of objects by one property
- How can I sort arrays and data in PHP?
- Best way to initialize (empty) array in PHP
- How do I get a PHP class constructor to call its parent’s parent’s constructor?
- How to find entry by object property from an array of objects?
- How to initialize static variables
- PHP: Storing ‘objects’ inside the $_SESSION
- How do I get an object’s unqualified (short) class name?
- Can I extend a class using more than 1 class in PHP?
- PHP Fatal error: Cannot redeclare class
- Creating anonymous objects in php
- What is ::class in PHP?
- How to destroy an object?
- How do I access this object property with an illegal name?
- What does new self(); mean in PHP?
- What does the variable $this mean in PHP?
- How to check that an object is empty in PHP?
- Calling closure assigned to object property directly
- Calling a function within a Class method?
- Static class initializer in PHP
- Array of PHP Objects
- Get first element in PHP stdObject
- PHP class instantiation. To use or not to use the parentheses? [closed]
- How to clone an array of objects in PHP?
- How to Cast Objects in PHP
- Autoloader for functions
- Can you use static constants inside classes in PHP?
- How to get name of the constant?
- Can I include code into a PHP class?
- How to implement class methods in array_map’s callable [duplicate]
- Set Font Color, Font Face and Font Size in PHPExcel
- Initialize an Associative Array with Key Names but Empty Values
- What Exception subclasses are built into PHP?
- Purpose of PHP constructors
- PHP check for instance of DateTime?
- PHP: how to get a list of classes that implement certain interface?
- PHP – recursive Array to Object?
- How do I access static member of a class?
- PHP Accessing Parent Class Variable
- Is PHP Object-oriented?
- Trying to get property of non-object in [duplicate]
- Create class instance from within static method
- Casting object to array – any magic method being called?