This is a shortcut to create a new object. Before PHP 5.3.0, you should do this:
$class = get_class($instance); $newInstance = new $class;
Starting with PHP 5.3.0 you can do the same with this:
$newInstance = new $instance;
Very useful, in my opinion, because it eliminates the need for a temporary variable.
To clarify, this creates a new object. This is not cloning. In other words, __construct() will be called instead of __clone() __construct() .
source share