What is this syntax supposed to do?
oop, php
Solution
Maybe they have some strange setup in the `__clone()` method that need to be called just after instatiation but it would be pretty pointless. If the class `PagesControl` has no `__clone()` method, just take off the `clone`, otherwise put the code that is present in the `__clone()` method inside the `__construct()`
Problem
I am managing a website with a custom framework, developed by some programmers who are no longer working in out company. In some parts of the code I saw this: ``` $class = 'PagesControl'; $obj = clone new $class(); ``` What is this thing supposed to do? Why would you clone an object created like that?