--TEST-- Tests of Binary subtype 9, Vectors, with dtype INT8: Simple Vector INT8 --DESCRIPTION-- Generated by scripts/convert-bson-binary-vector-tests.php DO NOT EDIT THIS FILE --FILE-- 127, 1 => 7, ); $binary = MongoDB\BSON\Binary::fromVector($vector, \MongoDB\BSON\VectorType::Int8); echo bin2hex((string) MongoDB\BSON\Document::fromPHP(['vector' => $binary])), "\n"; $bson = MongoDB\BSON\Document::fromBSON(hex2bin('1600000005766563746F7200040000000903007F0700')); var_dump($binary == $bson['vector']); ?> ===DONE=== --EXPECT-- 1600000005766563746f7200040000000903007f0700 bool(true) ===DONE===