--TEST-- Tests of Binary subtype 9, Vectors, with dtype FLOAT32: Infinity Vector FLOAT32 --DESCRIPTION-- Generated by scripts/convert-bson-binary-vector-tests.php DO NOT EDIT THIS FILE --FILE-- -INF, 1 => 0.0, 2 => INF, ); $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('2000000005766563746F72000E000000092700000080FF000000000000807F00')); var_dump($binary == $bson['vector']); ?> ===DONE=== --EXPECT-- 2000000005766563746f72000e000000092700000080ff000000000000807f00 bool(true) ===DONE===