Linux SRV-16 6.18.44-paas #1 SMP PREEMPT_DYNAMIC Thu Aug 13 10:08:12 UTC 2026 x86_64
/
proc
/
thread-self
/
root
/
opt
/
php-8.2
/
share
/
test
/
mongodb
/
tests
/
bson
/
//proc/thread-self/root/opt/php-8.2/share/test/mongodb/tests/bson/bson-document-fromPHP-002.phpt
--TEST-- MongoDB\BSON\Document::fromPHP(): Encodes non-Serializable objects as a document --FILE-- <?php require_once __DIR__ . '/../utils/basic.inc'; class MyDocument { private $foo = 1; protected $bar = 2; public $baz = 3; } $bson = MongoDB\BSON\Document::fromPHP(new MyDocument); echo $bson->toRelaxedExtendedJSON(), "\n"; ?> ===DONE=== <?php exit(0); ?> --EXPECT-- { "baz" : 3 } ===DONE===