Table of Contents

getPort

API Package Subpackage Class Method Reference Last reviewed Doc status
API Home Package Joomla.Framework Subpackage Environment Class JURI Method getPort Reference getPort() Never Work in Progress

Gets URI port number, or null if no port was specified.

Syntax

int getPort ()

Examples

Example

$uri = new JURI( 'http://forum.joomla.org:1572/index.php/topic,41464.msg227819.html#msg227819' );
echo "Port: " . $uri->getPort();

might produce:

Result

Port: 1572