Câu 15: 200-550: Zend Certified PHP Engineer
What is the output of the following code?class a{public $val;}function renderVal (a $a){if ($a) {echo $a->val;}}renderVal (null);
Nội dung câu hỏi
What is the output of the following code?class a{public $val;}function renderVal (a $a){if ($a) {echo $a->val;}}renderVal (null);
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. A syntax error in the function declaration line
- B. An error, because null is not an instance of 'a' — đáp án hiện tại
- C. Nothing, because a null value is being passed to renderVal()
- D. NULL
Cộng đồng
0 bình luận công khai. Tên thành viên được ẩn một phần.
Chưa có bình luận. Mở giao diện tương tác để bắt đầu thảo luận.