📁 File Manager Pro
v10.0.3 | PHP: 8.2.31
Server: LiteSpeed
2026-07-02 06:08:36
📂
/ (Root)
/
opt
/
alt
/
tests
/
alt-php85-pecl-mongodb_2.3.1-1.el8
/
tests
📍 /opt/alt/tests/alt-php85-pecl-mongodb_2.3.1-1.el8/tests
🔄 Refresh
✏️
Editing: packed_bit-003.phpt
Read Only
--TEST-- Tests of Binary subtype 9, Vectors, with dtype PACKED_BIT: PACKED_BIT with padding --DESCRIPTION-- Generated by scripts/convert-bson-binary-vector-tests.php DO NOT EDIT THIS FILE --FILE-- <?php require_once __DIR__ . '/../utils/basic.inc'; // Vector [127,8] with padding 3 $vector = array ( 0 => 0, 1 => 1, 2 => 1, 3 => 1, 4 => 1, 5 => 1, 6 => 1, 7 => 1, 8 => 0, 9 => 0, 10 => 0, 11 => 0, 12 => 1, ); $binary = MongoDB\BSON\Binary::fromVector($vector, \MongoDB\BSON\VectorType::PackedBit); echo bin2hex((string) MongoDB\BSON\Document::fromPHP(['vector' => $binary])), "\n"; $bson = MongoDB\BSON\Document::fromBSON(hex2bin('1600000005766563746F7200040000000910037F0800')); var_dump($binary == $bson['vector']); ?> ===DONE=== <?php exit(0); ?> --EXPECT-- 1600000005766563746f7200040000000910037f0800 bool(true) ===DONE===
💾 Save Changes
❌ Cancel