unpack

PHP 4, PHP 5, PHP 7, PHP 8
unpack - Unpack data from binary string
Unpack Online Tool
Manual
Code Examples

Example #1 unpack example

Result: Array ( [chars] => 4 [int] => 160 )
PHP Version:

Example #2 unpack example with a repeater

Result: Array ( [chars1] => 4 [chars2] => 0 [int] => 40960 )
PHP Version:


Example #3 of unpack

PHP Version: