Code
<?php

$m 
= new MongoClient();

/* @var $testDb MongoDB */
$testDb $m->selectDb('test');

/* @var $coll MongoCollection */
$coll $testDb->selectCollection('my_table');

$results $coll->find(array('_id' => new MongoId('5421399f895f69524d8b4567')));

foreach(
$results as $result) {
    
dump($result);
}
Result
^ array:4 [
"_id" => MongoId {#1394
+id: "5421399f895f69524d8b4567"
}
"name" => "myname"
"value" => "myvalue"
"object" => []
]
Used Versions
PHP 8.2, Laminas MVC 3.2, Symfony 5.2, Laravel 8.28, PHPUnit 9.5, Doctrine ORM 2.8