Title: POMO_Reader::readint32
Published: April 25, 2014
Last modified: May 20, 2026

---

# POMO_Reader::readint32(): mixed

## In this article

 * [Return](https://developer.wordpress.org/reference/classes/pomo_reader/readint32/?output_format=md#return)
 * [Source](https://developer.wordpress.org/reference/classes/pomo_reader/readint32/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/classes/pomo_reader/readint32/?output_format=md#related)

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

Reads a 32bit Integer from the Stream

## 󠀁[Return](https://developer.wordpress.org/reference/classes/pomo_reader/readint32/?output_format=md#return)󠁿

 mixed The integer, corresponding to the next 32 bits from the stream of false if
there are not enough bytes or on error

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

    ```php
    public function readint32() {
    	$bytes = $this->read( 4 );
    	if ( 4 !== $this->strlen( $bytes ) ) {
    		return false;
    	}
    	$endian_letter = ( 'big' === $this->endian ) ? 'N' : 'V';
    	$int           = unpack( $endian_letter, $bytes );
    	return reset( $int );
    }
    ```

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

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

| Uses | Description | 
| [POMO_Reader::strlen()](https://developer.wordpress.org/reference/classes/pomo_reader/strlen/)`wp-includes/pomo/streams.php` |  |

## User Contributed Notes

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