File manager - Edit - /opt/cpanel/ea-php74/root/usr/share/tests/pecl/mongodb/tests/bson/bson-fromPHP_error-002.phpt
Back
--TEST-- MongoDB\BSON\fromPHP(): Encoding unknown Type objects as a document field value --FILE-- <?php require_once __DIR__ . '/../utils/basic.inc'; class UnknownType implements MongoDB\BSON\Type {} $tests = array( array(new UnknownType()), array('x' => new UnknownType()), ); foreach ($tests as $document) { echo throws(function() use ($document) { MongoDB\BSON\fromPHP($document); }, 'MongoDB\Driver\Exception\UnexpectedValueException'), "\n"; } ?> ===DONE=== <?php exit(0); ?> --EXPECTF-- Deprecated: Function MongoDB\BSON\fromPHP() is deprecated in %s OK: Got MongoDB\Driver\Exception\UnexpectedValueException Unexpected MongoDB\BSON\Type instance: UnknownType Deprecated: Function MongoDB\BSON\fromPHP() is deprecated in %s OK: Got MongoDB\Driver\Exception\UnexpectedValueException Unexpected MongoDB\BSON\Type instance: UnknownType ===DONE===
| ver. 1.4 |
Github
|
.
| PHP 8.2.30 | Generation time: 0 |
proxy
|
phpinfo
|
Settings