Hex string looks like:
$hexString = "0307wordone0Banotherword0Dsomeotherword";
$wordsCount= hexdec(substr($hexString , 0, 2));
First byte (03) is total number of words in string. Next byte is count for characters of the first word (07). And after 7 bytes there is another integer 0B which tells that next word length is 11 (0B) characters, and so on...
What should function for exploding such string to array look like? We know how many iterations there should be from $wordsCount. I've tried different approaches but nothing seems to work.