I have a solution, but this solution is slow. Example:
$arr = array(14, 0, 1, 0, 0, 0, 0, 0, 0, 224, 0, 255, 255, 255, 255, 255);
$hex_str = "";
foreach ($arr as $byte)
{
$hex_str .= sprintf("%02X", $byte);
}
Result is: 0E0001000000000000E000FFFFFFFFFF
Format is:
255 => FF
0 => 00
1 => 01
14 => 0E
If you know a faster solution, share it please.