unpack()

It unpacks data from binary string

Example

<?php
echo “<pre>”;
print_r(unpack(“C*”,”phpcode”));
?>

Output

Array
(
[1] => 112
[2] => 104
[3] => 112
[4] => 99
[5] => 111
[6] => 100
[7] => 101
)

Share