Chaining library for common datatypes in PHP