Run »
number++; } public function getNumber() { return $this->number; } } $obj = new AnotherClass(); $obj->add1(); echo "The number is " . $obj->getNumber(); ?>
The number is 1