Linux SRV-16 6.18.44-paas #1 SMP PREEMPT_DYNAMIC Thu Aug 13 10:08:12 UTC 2026 x86_64
/
proc
/
self
/
root
/
proc
/
self
/
root
/
opt
/
php-8.2
/
share
/
test
/
mongodb
/
tests
/
cursor
/
//proc/self/root/proc/self/root/opt/php-8.2/share/test/mongodb/tests/cursor/cursorid-getId-001.phpt
--TEST-- MongoDB\Driver\Cursor::getId --SKIPIF-- <?php require __DIR__ . "/../utils/basic-skipif.inc"; ?> <?php skip_if_not_live(); ?> <?php skip_if_not_clean(); ?> --FILE-- <?php require_once __DIR__ . "/../utils/basic.inc"; $manager = create_test_manager(); $bulk = new MongoDB\Driver\BulkWrite(); $bulk->insert(['_id' => 1]); $bulk->insert(['_id' => 2]); $bulk->insert(['_id' => 3]); $manager->executeBulkWrite(NS, $bulk); $cursor = $manager->executeQuery(NS, new MongoDB\Driver\Query([], ['batchSize' => 2])); var_dump($cursor->getId()); var_dump($cursor->getId(false)); var_dump($cursor->getId(true)); ?> ===DONE=== <?php exit(0); ?> --EXPECTF-- Deprecated: MongoDB\Driver\Cursor::getId(): The method "MongoDB\Driver\Cursor::getId" will no longer return a "MongoDB\Driver\CursorId" instance in the future. Pass "true" as argument to change to the new behavior and receive a "MongoDB\BSON\Int64" instance instead. in %s object(MongoDB\Driver\CursorId)#%d (%d) { ["id"]=> %rint\(%d\)|string\(%d\) "%d"%r } Deprecated: MongoDB\Driver\Cursor::getId(): The method "MongoDB\Driver\Cursor::getId" will no longer return a "MongoDB\Driver\CursorId" instance in the future. Pass "true" as argument to change to the new behavior and receive a "MongoDB\BSON\Int64" instance instead. in %s object(MongoDB\Driver\CursorId)#%d (%d) { ["id"]=> %rint\(%d\)|string\(%d\) "%d"%r } object(MongoDB\BSON\Int64)#%d (%d) { ["integer"]=> string(%d) "%d" } ===DONE===