I have this code. And i need to print those strings. But i can't make changes outside the class. So i need to change inside class to work. The fields must remain private. Any ideas?
class STUDENT {
private $nume,$prenume;
# Constructor
public function __construct($nume , $prenume){
$this->nume=$nume;
$this->prenume=$prenume;
}
}
$student = new STUDENT("one","two");
echo "student: ". $student ."<hr/>";