In the PHP manual I keep seeing this arrow symbol -> used in examples of classes and methods. For instance:
[code]<?php
class Cart {
var $items; // Items in our shopping cart
// Add $num articles of $artnr to the cart
function add_item($artnr, $num) {
$this->items[$artnr] += $num;
}[/code]
and
<?php
$cart = new Cart;
$cart->add_item("10", 1);
What function does the -> operator serve? Is it like the dot (as in cart.add_item) in Java? And is $this a reserved variable, and if so how does it work?