Home »
MCQs »
PHP MCQs
What will be the output of the following PHP code (12)?
46. What will be the output of the following PHP code?
<?php
$str = "Includehelp";
echo pack("H*",bin2hex($str));
?>
- 496e636c75646568656c70
- Includehelp
- 496e636c75646568656c70Includehelp
- Includehelp496e636c75646568656c70
Answer: B) Includehelp
Explanation:
The bin2hex() function converts a string of ASCII characters to hexadecimal values. And, the pack() function converts hexadecimal values back to the string.