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
Is that going it change something in performance of PHP?
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);
Otherwise what is the destructor in PHP?