public function height() : int
    {
        return 1 + max(
            $this->left ? $this->left->height() : 0,
            $this->right ? $this->right->height() : 0
        );
    }
public function height() : int
    {
        return 1 + max(
            $this->left ? $this->left->height() : 0,
            $this->right ? $this->right->height() : 0
        );
    }
public function height ( ) : int { return 1 + max ( $ this -> left ? $ this -> left -> height ( ) : 0 , $ this -> right ? $ this -> right -> height ( ) : 0 ) ; }
Recursive function to determine the height of the node.

@return int
Recursive function to determine the height of the node .