...
/Challenge: Serialize and Unserialize Different Data Structures
Challenge: Serialize and Unserialize Different Data Structures
A hands-on exercise to test your knowledge of the new PHP 8’s backward-compatibility break.
We'll cover the following...
This challenge will extensively test our concepts regarding the new PHP 8’s backward compatibility break. We will use these concepts to use the serialization and unserialization process for different types of data structures, including ArrayObject
, ArrayIterator
, SplDoublyLinkedList
, and SplObjectStorage
.
Task 1
Implement a PHP 8 Script that initializes an
ArrayObject
with two keys.Serialize the
ArrayObject
.Unserialize the serialized array to recreate the original array. ...