PHP Better-types Resources