Isset Method
<?php //To check Whether any value is set OR Not to any Variable We can use isset() method. //isset() function returns two values 1(True) OR 0(False). class Student { public $course ; private $first_name ; private $last_name ; private $detail = [ "name" => "Test name" , "age" => "30" ]; public function setName ( $fname , $lname ) { $this -> first_name = $fname ; $this -> last_name = $lname ; } // public function __isset($property) // { // echo isset($this->$property); // } public function __isset ( $name ) { echo isset ( $this -> detail [ $name ]); } } $test = new Student (); $test -> setName ( "...