Title: POP3::popstat
Published: February 3, 2022
Last modified: May 20, 2026

---

# POP3::popstat()

## In this article

 * [Source](https://developer.wordpress.org/reference/classes/pop3/popstat/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/classes/pop3/popstat/?output_format=md#related)

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

## 󠀁[Source](https://developer.wordpress.org/reference/classes/pop3/popstat/?output_format=md#source)󠁿

    ```php
    function popstat () {
        //  Returns an array of 2 elements. The number of undeleted
        //  msgs in the mailbox, and the size of the mbox in octets.

        $PopArray = $this->last("array");

        if($PopArray == -1) { return false; }

        if( (!$PopArray) or (empty($PopArray)) )
        {
            return false;
        }
        return $PopArray;
    }
    ```

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

## 󠀁[Related](https://developer.wordpress.org/reference/classes/pop3/popstat/?output_format=md#related)󠁿

| Uses | Description | 
| [POP3::last()](https://developer.wordpress.org/reference/classes/pop3/last/)`wp-includes/class-pop3.php` |  |

## User Contributed Notes

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