<?php
// Remember (PHP) documentation is your friend, use it!
// Do not be afraid to scroll to the User Contributed Notes.
// Keep in mind that when declaring a method you need to use "function" keyword.
class ShoppingCart implements ArrayAccess, Iterator {
// TODO: Start with ArrayAccess!
}
// Do not modify code bellow this line.
// Expected output:
// Content:
// apple : 3
if (!isset($ignoreTest)) {
$cart = new ShoppingCart();
print("Content:\n");
// Array like access.
$cart['apple'] = 2;
++$cart['apple'];
// Iteration.
foreach($cart as $name => $count) {
print(" $name : $count\n");
}
}