PHP code example of ddrv / extra-pack

1. Go to this page and download the library: Download ddrv/extra-pack library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

ddrv / extra-pack example snippets





$data = array(
    'key1' => 'string',
    'key2' => 5,
    'key3' => .0001
);
$format = 'A6key1/Ckey2/t4key3';
$binary = \Ddrv\Extra\Pack::pack($format, $data);
$result = \Ddrv\Extra\Pack::unpack($format, $binary);
print_r($result);