Wednesday, November 18, 2009

What type of inheritance that php supports?

PHP support the Multilevel inheritance Not a multiple inheritance.

For Example:

class A{

function hello();
}

// This is possible.
class B extends A{

function helloB();
}

// This is not possible, IT gives the fatal error.
class C extends A{

function helloC();
}

No comments: