x = $x; $this->y = $y; ++self::$pointCount; } public function __destruct() { --self::$pointCount; } ///* public function __clone() { ++self::$pointCount; // echo "Inside " . __METHOD__ . ", point count = " . self::$pointCount . "\n"; } //*/ public function __toString() { return '(' . $this->x . ',' . $this->y . ')'; } public function serialize() { return serialize( /*...*/ ); } public function unserialize($data) { // ... = unserialize($data); } }