Linux SRV-16 6.18.44-paas #1 SMP PREEMPT_DYNAMIC Thu Aug 13 10:08:12 UTC 2026 x86_64
/
opt
/
php-8.1
/
share
/
test
/
mongodb
/
tests
/
bson
/
//opt/php-8.1/share/test/mongodb/tests/bson/bson-packedarray-toRelaxedExtendedJSON-001.phpt
--TEST-- MongoDB\BSON\PackedArray::toRelaxedExtendedJSON(): Encoding JSON --FILE-- <?php require_once __DIR__ . '/../utils/basic.inc'; $tests = [ [], [ null ], [ true ], [ 'foo' ], [ 123 ], [ 1.0, ], [ NAN ], [ INF ], [ -INF ], [ [ 'foo', 'bar' ]], [ [ 'foo' => 'bar' ]], ]; foreach ($tests as $value) { echo MongoDB\BSON\PackedArray::fromPHP($value)->toRelaxedExtendedJSON(), "\n"; } ?> ===DONE=== <?php exit(0); ?> --EXPECT-- [ ] [ null ] [ true ] [ "foo" ] [ 123 ] [ 1.0 ] [ { "$numberDouble" : "NaN" } ] [ { "$numberDouble" : "Infinity" } ] [ { "$numberDouble" : "-Infinity" } ] [ [ "foo", "bar" ] ] [ { "foo" : "bar" } ] ===DONE===