Title: POP3::__construct
Published: February 3, 2022
Last modified: February 24, 2026

---

# POP3::__construct( $server,  $timeout )

[ Back to top](https://developer.wordpress.org/reference/classes/pop3/__construct/?output_format=md#wp--skip-link--target)

PHP5 constructor.

## Source

    ```php
    function __construct ( $server = '', $timeout = '' ) {
        settype($this->BUFFER,"integer");
        if( !empty($server) ) {
            // Do not allow programs to alter MAILSERVER
            // if it is already specified. They can get around
            // this if they -really- want to, so don't count on it.
            if(empty($this->MAILSERVER))
                $this->MAILSERVER = $server;
        }
        if(!empty($timeout)) {
            settype($timeout,"integer");
            $this->TIMEOUT = $timeout;
            // Extend POP3 request timeout to the specified TIMEOUT property.
            if(function_exists("set_time_limit")){
                set_time_limit($timeout);
            }
        }
        return true;
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/class-pop3.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/6.9.4/src/wp-includes/class-pop3.php#L50)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/class-pop3.php#L50-L68)

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fclasses%2Fpop3%2F__construct%2F)
before being able to contribute a note or feedback.