Reputation: 63
I want to output "\x68\x61\061"
$a = "\x68\x61\061";
echo $a
This does not result into "\x68\x61\061" in the output. How to fix this?
Upvotes: 1
Views: 100
Reputation: 11302
Escape your special characters, in this case backslashes, with another backslash.
$a = "\\x68\\x61\\061";
echo $a;
or use single-quotes instead.
$a = '\x68\x61\061';
echo $a;
Upvotes: 4