I'm creating a new object inside a foreach loop and I don't really know how to call a specific object since they all have the same name.

Here is the class :

```
class Item{
    public static $allItems = array();
    public $slot;
    public $id;

    public function __construct($slot, $id){
        self::$allItems[] = $this;
        $this->slot = $slot;
        $this->id = $id;
    }
}

```

And here is the foreach loop :

```
foreach($item_type as $key => $type){
        $itemID = $_SESSION[$type.'ID'];
        $item = new Item($key, $itemID);
    }

```

Is there a way to name them differently or to call a specific instance?