ÿØÿà JFIF ÿÛ „ ( %!1!%*+...983,7(-.-
File manager
File manager - Edit - /opt/alt/tests/alt-php85-pecl-mongodb_2.1.4-3.el8/tests/bug0334-001.phpt
Back
--TEST-- PHPC-334: Injected __pclass should override a __pclass key in bsonSerialize() return value --FILE-- <?php require_once __DIR__ . '/../utils/basic.inc'; class MyClass implements MongoDB\BSON\Persistable { public function bsonSerialize(): array { return array( "__pclass" => "baz", "foo" => "bar", ); } public function bsonUnserialize(array $data): void { } } $bson = fromPHP(new MyClass); $php = toPHP($bson, array('root' => 'array')); var_dump($php['__pclass']->getData()); ?> ===DONE=== <?php exit(0); ?> --EXPECT-- string(7) "MyClass" ===DONE===
| ver. 1.4 |
Github
|
.
| PHP 8.1.34 | Generation time: 0.53 |
proxy
|
phpinfo
|
Settings