If you do not specify a custom _id, the driver automatically pushes the generated _id to the given document.
After saving, you can directly access the created _id:
<?php
...
$collection->insert($doc);
var_dump($doc['_id'])
// example output
object(MongoId)#8 (1) {
["$id"]=>
string(24) "4e2995576803fab768000000"
}