What are the best practices for implementing the Serializable interface in PHP classes for proper object serialization?

When implementing the Serializable interface in PHP classes for proper object serialization, it is important to define the serialize() and unserialize() methods. The serialize() method should return a string representation of the object's state, while the unserialize() method should restore the object's state from the serialized string.

class MyClass implements Serializable {
    private $data;

    public function serialize() {
        return serialize($this->data);
    }

    public function unserialize($data) {
        $this->data = unserialize($data);
    }
}