PHP 8.5.0 Beta 1 available for testing

Voting

: nine plus zero?
(Example: nine)

The Note You're Voting On

arma99eDAN at yahoo dot com
10 years ago
You can use an abstract class like this too:

abstract class A{
public function show(){
echo 'A';
}
}
class B extends A{
public function hello(){
echo 'B';
parent::show();
}
}

$obj = new B;
$obj->hello(); // BA
# See that the abstract class does not have at least one abstract method
# Even in this case, I'm still able to extend it, or call its non-abstract member

<< Back to user notes page

To Top