--TEST-- PHPC-671: Segfault if Manager is already freed when using WriteResult's Server --SKIPIF-- --FILE-- insert(['_id' => 1]); $writeResult = $manager->executeBulkWrite(NS, $bulk); unset($manager); $server = $writeResult->getServer(); /* WriteResult only uses the client to construct a Server. We need to interact * with the Server to test for a user-after-free. */ $cursor = $server->executeCommand(DATABASE_NAME, new MongoDB\Driver\Command(['ping' => 1])); var_dump($cursor->toArray()[0]); ?> ===DONE=== --EXPECTF-- object(stdClass)#%d (%d) { ["ok"]=> float(1)%A } ===DONE===