Posted by: Pdfprep
Post Date: November 3, 2020
What is the output of the following code?
class Base {
protected static function whoami() {
echo "Base ";
}
public static function whoareyou() {
static::whoami();
class A extends Base {
public static function test() {
Base::whoareyou();
}
self::whoareyou();
parent::whoareyou();
A::whoareyou();
static::whoareyou();
public static function whoa mi() {
echo "A";
class B extends A {
}
public static function whoa mi() {
echo "B ";
B::test();
A . BBB BB
B . Base A Base A B
C . Base BB AB
D . Base BAAB
Answer: C
Leave a Reply