public function decodeNULstrings($data, $limit = 1, &$p = 0)
    {
        $r = [];

        for ($i = 0; $i < $limit; ++$i) {
            $pos = mb_orig_strpos($data, "\x00", $p);

            if ($pos === false) {
                break;
            }

            $r[] = mb_orig_substr($data, $p, $pos - $p);

            $p = $pos + 1;
        }

        return $r;
    }