PHP Session helper, extracted from my melting codebase monolith.