Tag: destructor
-

PHP Constructor & Destructor
Create a Course class for student that display their course code and subject enrolled from an institute. Explanation Way 1: <?php class Course{ public function __construct() { echo “The class “. __CLASS__.” was initiated<br>”; } public function __destruct() { echo “The class “. __CLASS__.” was destroyed”; }…