📁 File Manager Pro
v10.0.3 | PHP: 7.4.33
Server: LiteSpeed
2026-07-12 06:05:12
📂
/ (Root)
/
opt
/
alt
/
tests
/
alt-php83-pecl-mongodb_1.18.1-1.el8
/
tests
📍 /opt/alt/tests/alt-php83-pecl-mongodb_1.18.1-1.el8/tests
🔄 Refresh
✏️
Editing: bson-toPHP_error-003.phpt
Read Only
--TEST-- MongoDB\BSON\toPHP(): BSON decoding exceptions for malformed documents --FILE-- <?php require_once __DIR__ . '/../utils/basic.inc'; $tests = array( pack('Vx', 4), // Empty document with invalid length (too small) pack('Vx', 6), // Empty document with invalid length (too large) ); foreach ($tests as $bson) { echo throws(function() use ($bson) { toPHP($bson); }, 'MongoDB\Driver\Exception\UnexpectedValueException'), "\n"; } ?> ===DONE=== <?php exit(0); ?> --EXPECTF-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException Could not read document from BSON reader OK: Got MongoDB\Driver\Exception\UnexpectedValueException Could not read document from BSON reader ===DONE===
💾 Save Changes
❌ Cancel