In this example, we check whether the `cart` session variable is set. If it is, we set the value to a variable for later use, otherwise we create an empty array. The package library for PHP sessions is included in the core PHP installation. No external libraries are required.