Source code for a MongoDB-based PHP session handler. Make sure you are reading the warnings (no concurrency support, durability, etc.):
This class was built as a drop-in for easily switching to handling sessions using Mongo. It’s a great replacement to memcache(d) for VPS servers where you risk memory being reshuffled in the pool and taking performance hits.