Câu 12: 200-550: Zend Certified PHP Engineer
SIMULATION -Consider the following code. Which keyword should be used in the line marked with "KEYWORD" instead of "self" to make this code work as intended? abstract class Base { protected function __construct() {}public static function create() {return new self(); // KEYWORD}abstract function action();}class Item ex…
Nội dung câu hỏi
SIMULATION -Consider the following code. Which keyword should be used in the line marked with "KEYWORD" instead of "self" to make this code work as intended? abstract class Base { protected function __construct() {}public static function create() {return new self(); // KEYWORD}abstract function action();}class Item extends Base {public function action() { echo **CLASS**; }}$item = Item::create();$item->action(); // outputs "Item"
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. static — đáp án hiện tại
- B. parent
- C. this
- D. class
Cộng đồng
0 bình luận công khai. Tên thành viên được ẩn một phần.