Version 1.0
Taken from https://www.phpclasses.org/browse/file/11680.html, cred to Miles Kaufmann
This repository is cloned for two reasons:
- To allow downloading the code without signing in to phpclasses.org.
- To add very small improvements to the code.