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