Created
September 27, 2020 16:05
-
-
Save Kaushalya-Udani/c10c9833310dcac80dc2e320cb0b5fca to your computer and use it in GitHub Desktop.
encapsulation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class ICT{ | |
private $studentId; | |
private $pwd; | |
public function setdetails($studentId,$pwd){ | |
$this->studentId = $studentId; | |
$this->pwd = $pwd; | |
} | |
public function getdetails(){ | |
echo "Id is {$this->studentId} password {$this->pwd}"; | |
} | |
} | |
$user = new ICT(); | |
$user->setdetails('123dimuthu','2664kdh'); | |
$user->getdetails(); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment