class point {
var $x, $y;
function point($x, $y) {
$this->x = $x;
$this->y = $y;
}
function setPoint($x, $y) {
$this->x = $x;
$this->y = $y;
}
function getPoint() {
return array("x" => $this->x, "y" => $this->ys);
}
}
$p1 = new point(2, 3);
print_r(get_object_vars($p1));
/*
run:
Array ( [x] => 2 [y] => 3 )
*/