Define, validate and process PHP datastructures