File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed
Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -140,12 +140,8 @@ Examples:
140140use MessagePack\Packer;
141141use MessagePack\PackOptions;
142142
143- // pack PHP strings to MP strings, PHP arrays to MP maps
144- // and PHP 64-bit floats (doubles) to MP 32-bit floats
145- $packer = new Packer(PackOptions::FORCE_STR | PackOptions::FORCE_MAP | PackOptions::FORCE_FLOAT32);
146-
147- // pack PHP strings to MP binaries and PHP arrays to MP arrays
148- $packer = new Packer(PackOptions::FORCE_BIN | PackOptions::FORCE_ARR);
143+ // detect str/bin type and pack PHP 64-bit floats (doubles) to MP 32-bit floats
144+ $packer = new Packer(PackOptions::DETECT_STR_BIN | PackOptions::FORCE_FLOAT32);
149145
150146// these will throw MessagePack\Exception\InvalidOptionException
151147$packer = new Packer(PackOptions::FORCE_STR | PackOptions::FORCE_BIN);
You can’t perform that action at this time.
0 commit comments