--TEST-- Tests of Binary subtype 9, Vectors, with dtype FLOAT32: Vector with decimals and negative value FLOAT32 --DESCRIPTION-- Generated by scripts/convert-bson-binary-vector-tests.php DO NOT EDIT THIS FILE --FILE-- 127.7, 1 => -7.7, ); $binary = MongoDB\BSON\Binary::fromVector($vector, \MongoDB\BSON\VectorType::Float32); echo bin2hex((string) MongoDB\BSON\Document::fromPHP(['vector' => $binary])), "\n"; $bson = MongoDB\BSON\Document::fromBSON(hex2bin('1C00000005766563746F72000A0000000927006666FF426666F6C000')); var_dump($binary == $bson['vector']); ?> ===DONE=== --EXPECT-- 1c00000005766563746f72000a0000000927006666ff426666f6c000 bool(true) ===DONE===