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?
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 classPagesControlhas no__clone()method, just take off theclone, otherwise put the code that is present in the__clone()method inside the__construct()