Unpack refactor and improved isAssoc documentation
Unpack
- Replaced internal method argument with mode argument
- Added 4 modes of handling array at highest nesting depth
- UNPACK_ALL (default) - unpack every nested array
$arr['foo.bar.0'] = 'a'; $arr['foo.bar.1'] = 'b';
- UNPACK_PRESERVE_LIST_ARRAY - preserve list type array
$arr['foo.bar'] = ['a', 'b'];
- UNPACK_PRESERVE_ASSOC_ARRAY - preserve associative array
$arr['foo.bar'] = ['a' => 1, 'b' => 2];
- UNPACK_PRESERVE_ARRAY - work as both of options above combined
- UNPACK_ALL (default) - unpack every nested array
- For examples check out unpack test method
testUnpack - Examples in documentation coming soon
isAssoc
- Clarified in PHPDoc how both values of
$strictflag works