Help get this topic noticed by sharing it on Twitter, Facebook, or email.

The Parent Operator !

I am having problem in code of page number 115 chapter 5 topic is inheritance`s subtopic THE PARENT OPERATOR the code is not working ... I have change the names of class and other methods please help me !

class user {

function get_password()
{
echo "this is static method";
}

}

class user extends Subs{

function test() {
echo "subs extended from user";
}
function test2() {
parent::get_password();
}
}

$obj = new Subs;
$obj->test();
$obj->test2();
1 person has
this question
+1
Reply