public function search($key) { $c = $this->compare($this->key, $key); if ($c === 0) { return $this; } else { if ($c > 0) { return $this->right->search($key); } else { return $this->left->search($key); } } }