I want to know the real use constructors in PHP.
I found some classes in PHP with a destructor that destroys all the attributes of objects in the destructor with unset
private $object1, $object2, $object3;
public function __construct()
$this->object1 = new ClassBB;
$this->object2 = new SampleClass;
$this->object3 = new Example;
// Content Class
public function __destruct()
unset($this->object1, $this->object2, $this->object3);
Is that going it change something in performance of PHP?
Otherwise what is the destructor in PHP?