pub fn new(val: T) -> ZBox<Self> {
        // SAFETY: We are providing a value to initialize the object with.
        unsafe { Self::internal_new(Some(val), None) }
    }
Creates a new [`ZendClassObject`] of type `T`, where `T` is a
[`RegisteredClass`] in PHP, storing the given value `val` inside the
object.

# Parameters

* `val` - The value to store inside the object.

# Panics

Panics if memory was unable to be allocated for the new object.
src/types/class_object.rs