Answer the question
In order to leave comments, you need to log in
How to properly pack/unpack data to/from a binary string (pack/unpack)?
I watched examples of use, understood almost nothing, could you (who used and knows or just understood what and how)
explain to me what and how?
and I can't understand anything.
How to properly pack an array/strings
and unpack?
I do something like this:
$str = base_convert('banny_boom', 16, 2); //101110101011
$pack = pack('C*',$str); //�
$unpack = unpack('Cstring', $ver);//int(255)
string(12) "101110101011"
string(1) "�"
array(1) {
["string"]=>
int(255)
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question