200-710 Exam QuestionsBrowse all questions from this exam

200-710 Exam - Question 20


Given a php.ini setting of -

default_charset = utf-8

what will the following code print in the browser?

Show Answer
Correct Answer: AC

The correct answer is three Unicode characters, or unreadable text, depending on the browser. Despite setting the 'Content-Type' to 'charset=iso-8859-1', the 'default_charset' setting in php.ini does not override the explicit 'Content-Type' header. Therefore, the browser will attempt to render the Unicode characters given in the 'echo' statement. However, since 'iso-8859-1' does not support these Unicode characters, the actual display may vary based on the browser's handling of unsupported characters, leading to either proper Unicode characters or unreadable text.

Discussion

2 comments
Sign in to comment
ZhukovPeterOption: A
Jan 4, 2020

I think answer should be A. Program: header('Content-Type: text/html; charset=iso-8859-1'); echo '✂✔✝'; outout: ✂✔✝ (3 unicode characters, I don't know will it be printed in discussion here).

[Removed]Option: A
Jun 20, 2020

The correct answer should be A