PHP - Document based data type helper.