lib/ezutils/classes/ezsys.php
public static function serverPort()
    {
        if ( empty( $GLOBALS['eZSysServerPort'] ) )
        {
            $hostname = self::hostname();
            if ( preg_match( "/.*:([0-9]+)/", $hostname, $regs ) )
            {
                $port = (int) $regs[1];
            }
            else
            {
                $port = (int) self::serverVariable( 'SERVER_PORT', true );
            }

            if ( !$port )
            {
                $port = 80;
            }

            $GLOBALS['eZSysServerPort'] = $port;
        }
        return $GLOBALS['eZSysServerPort'];
    }
public static function serverPort()
    {
        if ( empty( $GLOBALS['eZSysServerPort'] ) )
        {
            $hostname = self::hostname();
            if ( preg_match( "/.*:([0-9]+)/", $hostname, $regs ) )
            {
                $port = (int) $regs[1];
            }
            else
            {
                $port = (int) self::serverVariable( 'SERVER_PORT', true );
            }

            if ( !$port )
            {
                $port = 80;
            }

            $GLOBALS['eZSysServerPort'] = $port;
        }
        return $GLOBALS['eZSysServerPort'];
    }
public static function serverPort ( ) { if ( empty ( $ GLOBALS [ 'eZSysServerPort' ] ) ) { $ hostname = self :: hostname ( ) ; if ( preg_match ( "/.*:([0-9]+)/" , $ hostname , $ regs ) ) { $ port = ( int ) $ regs [ 1 ] ; } else { $ port = ( int ) self :: serverVariable ( 'SERVER_PORT' , true ) ; } if ( ! $ port ) { $ port = 80 ; } $ GLOBALS [ 'eZSysServerPort' ] = $ port ; } return $ GLOBALS [ 'eZSysServerPort' ] ; }
Returns the server port or 80 as default if the server port can not
be retrieved from the hostname or the server variable 'SERVER_PORT'

@return int
Returns the server port or 80 as default if the server port can not be retrieved from the hostname or the server variable SERVER_PORT