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;
    }
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;
    }
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 ; }
Decode strings from the NUL-terminated representation
@param  string $data Binary data
@param  integer $limit Optional. Limit of count. Default is 1.
@param  reference &$p Optional. Pointer.
@return array            Decoded strings
Decode strings from the NUL - terminated representation