lib/Elastica/Node/Info.php
public function getPort(): string
    {
        // Returns string in format: inet[/192.168.1.115:9201]
        $data = $this->get('http_address');
        $data = \substr($data, 6, \strlen($data) - 7);
        $data = \explode(':', $data);

        return $data[1];
    }
public function getPort(): string
    {
        // Returns string in format: inet[/192.168.1.115:9201]
        $data = $this->get('http_address');
        $data = \substr($data, 6, \strlen($data) - 7);
        $data = \explode(':', $data);

        return $data[1];
    }
public function getPort ( ) : string { // Returns string in format: inet[/192.168.1.115:9201] $ data = $ this -> get ( 'http_address' ) ; $ data = \ substr ( $ data , 6 , \ strlen ( $ data ) - 7 ) ; $ data = \ explode ( ':' , $ data ) ; return $ data [ 1 ] ; }
Return port of the node.

@return string Returns Node port
Return port of the node .