Skip to content

Commit d4776c1

Browse files
committed
Tweak README.md
1 parent 398bdcb commit d4776c1

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

README.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -140,12 +140,8 @@ Examples:
140140
use MessagePack\Packer;
141141
use 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);

0 commit comments

Comments
 (0)