Given a php.ini setting of -
default_charset = utf-8
what will the following code print in the browser?
Given a php.ini setting of -
default_charset = utf-8
what will the following code print in the browser?
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.
The correct answer should be A
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).