📁 File Manager Pro
v10.0.3 | PHP: 7.4.33
Server: LiteSpeed
2026-07-12 06:49:30
📂
/ (Root)
/
opt
/
alt
/
tests
/
alt-php84-pecl-mongodb_1.20.0-2.el8
/
tests
📍 /opt/alt/tests/alt-php84-pecl-mongodb_1.20.0-2.el8/tests
🔄 Refresh
✏️
Editing: bson-decimal128-jsonserialize-002.phpt
Read Only
--TEST-- MongoDB\BSON\Decimal128::jsonSerialize() with json_encode() --FILE-- <?php require_once __DIR__ . '/../utils/basic.inc'; $doc = ['foo' => new MongoDB\BSON\Decimal128('12389719287312')]; $json = json_encode($doc); echo toJSON(fromPHP($doc)), "\n"; echo $json, "\n"; var_dump(toPHP(fromJSON($json))); ?> ===DONE=== <?php exit(0); ?> --EXPECTF-- { "foo" : { "$numberDecimal" : "12389719287312" } } {"foo":{"$numberDecimal":"12389719287312"}} object(stdClass)#%d (%d) { ["foo"]=> object(MongoDB\BSON\Decimal128)#%d (%d) { ["dec"]=> string(14) "12389719287312" } } ===DONE===
💾 Save Changes
❌ Cancel