How machine id/host name is mapped/demapped to 3 byte in object id?
问题 How machine id/host name is mapped/demapped to 3 byte in object id? And where should i look for machine id in linux? domU-12-31-39-13-02-56 looks very strange and i am not sure it's correct or not? <?php $id = new MongoId('4f7351390c211d0a3d000004'); print_r($id->getHostname()); //domU-12-31-39-13-02-56 ?> 回答1: That function is not getting your hostname from the ObjectID, it shows you what hostname PHP is using to generate the unique IDs: http://php.net/manual/en/mongoid.gethostname.php The