In this program i try to explore the Oops concept in PHP, but here the things are much different from java. in the sample program i have created an abstract class bird, class parrot which extends the bird class and an interface flyable. after that i included all the above class and interface in a php file. let have a look at the code
<?php
include 'bird.php';
include 'parrot.php';
include 'flyable.php';
//creating a object
$bird1=new parrot();
echo $bird1->display();
echo("<br/>");
bird $bird2=new parrot(); //shows error
?>
the thing i want to ask is that when i try to define the type of the object class like bird $bird1= new parrot(); at his line i get error but this thing works perfectly in java. please let me know how can i accomplish this thing in php.
parrotorbirdimplementsflyablethen surely you have the includes in the wrong order.