Skip to content

Instantly share code, notes, and snippets.

@lighth7015
Last active October 30, 2021 18:23
Show Gist options
  • Save lighth7015/4537c311ea2ad9bb92a65e443e03ab9d to your computer and use it in GitHub Desktop.
Save lighth7015/4537c311ea2ad9bb92a65e443e03ab9d to your computer and use it in GitHub Desktop.
Expected output vs. Actual output
<?php
$format = 'Va*';
die(print_r(unpack($format, pack($format, time(), "test")), true ));
/**
* Expected output:
* Array
* (
* [V] => 1635617836
* [a*] => test
* )
*
* Actual output:
* Array
* (
* [V*] => 1635617836
* )
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment