Câu 13: 200-550: Zend Certified PHP Engineer
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 fu…
Nội dung câu hỏi
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 whoami() {echo "A ";}}class B extends A {public static function whoami() {echo "B ";}}B::test();
Các lựa chọn
Đáp án được giữ gọn theo nhãn A, B, C, D trong phần bình chọn tương tác.
- A. B B B B B
- B. Base A Base A B
- C. Base B B A B — đáp án hiện tại
- D. Base B A A B
Cộng đồng
0 bình luận công khai. Tên thành viên được ẩn một phần.