PHP structured binary parser