<?php
class hello
{
var $id;
var $edi;
function hello()
{
$this->id="1234";
$this->edi="abc";
}
public function display()
{
echo $this->id;
echo $this->edi;
}
}
class hello1 extends hello
{
function display($a,$b)
{
hello::display();
echo "</br>";
echo $this->id=$a;
echo $this->edi=$b;
}
}
$obj=new hello;
$obj1=new hello1;
$obj1->display("a","b");
?>
output
1234abc
ab
class hello
{
var $id;
var $edi;
function hello()
{
$this->id="1234";
$this->edi="abc";
}
public function display()
{
echo $this->id;
echo $this->edi;
}
}
class hello1 extends hello
{
function display($a,$b)
{
hello::display();
echo "</br>";
echo $this->id=$a;
echo $this->edi=$b;
}
}
$obj=new hello;
$obj1=new hello1;
$obj1->display("a","b");
?>
output
1234abc
ab