Home > PHP > Function > Misc. > unpack()

unpack()

unpack - Unpack data from binary string

Syntax

array unpack (string $format, string $data)

Arguments

  • format - See pack() for an explanation of the format codes.
  • data - The packed data.

Description

Unpacks from a binary string into an array according to the given format.

Version

PHP 4, 5

Return value

Returns an associative array containing unpacked elements of binary string.