class gebruiken in php

<?php
class  AnyClass {
public $var;
public function anyFunc() {
echo $this->data;
}
}
$new-object = new AnyClass();
$new-object->data = "whatever";
$another-object = new AnyClass();
$another-object->data "something";

$new-object->anyFunc();
$another-object->anyFunc();
?>