Unexpected output with pack()
Posted: Sun May 18, 2008 10:47 pm
I'm trying to pack a hex string into binary but I'm not getting the output I expect:
Returns
But shouldn't it be returning
Thank you in advance.
Code: Select all
var_dump(bin2hex(pack('H', 'ff')));Code: Select all
string(2) "f0"Code: Select all
string(2) "ff"