fn change_type(&mut self, ty: ZvalTypeFlags) {
        // SAFETY: we have exclusive mutable access to this zval so can free the
        // contents.
        unsafe { zval_ptr_dtor(self) };
        self.u1.type_info = ty.bits();
    }
Changes the type of the zval, freeing the current contents when
applicable.

# Parameters

* `ty` - The new type of the zval.
src/types/zval.rs