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

---

# __return_zero(): int

## In this article

 * [Description](https://developer.wordpress.org/reference/functions/__return_zero/?output_format=md#description)
 * [Return](https://developer.wordpress.org/reference/functions/__return_zero/?output_format=md#return)
 * [Source](https://developer.wordpress.org/reference/functions/__return_zero/?output_format=md#source)
 * [Changelog](https://developer.wordpress.org/reference/functions/__return_zero/?output_format=md#changelog)
 * [User Contributed Notes](https://developer.wordpress.org/reference/functions/__return_zero/?output_format=md#user-contributed-notes)

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

Returns 0.

## 󠀁[Description](https://developer.wordpress.org/reference/functions/__return_zero/?output_format=md#description)󠁿

Useful for returning 0 to filters easily.

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

 int 0.

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

    ```php
    function __return_zero() { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionDoubleUnderscore,PHPCompatibility.FunctionNameRestrictions.ReservedFunctionNames.FunctionDoubleUnderscore
    	return 0;
    }
    ```

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

## 󠀁[Changelog](https://developer.wordpress.org/reference/functions/__return_zero/?output_format=md#changelog)󠁿

| Version | Description | 
| [3.0.0](https://developer.wordpress.org/reference/since/3.0.0/) | Introduced. |

## 󠀁[User Contributed Notes](https://developer.wordpress.org/reference/functions/__return_zero/?output_format=md#user-contributed-notes)󠁿

 1.  [Skip to note 2 content](https://developer.wordpress.org/reference/functions/__return_zero/?output_format=md#comment-content-1519)
 2.   [Codex](https://profiles.wordpress.org/codex/)  [  10 years ago  ](https://developer.wordpress.org/reference/functions/__return_zero/#comment-1519)
 3. [You must log in to vote on the helpfulness of this note](https://login.wordpress.org?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2F__return_zero%2F%23comment-1519)
    Vote results for this note: -1[You must log in to vote on the helpfulness of this note](https://login.wordpress.org?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2F__return_zero%2F%23comment-1519)
 4. **Add a filter on `example_filter` that returns 0.**
 5.     ```php
        add_filter( 'example_filter', '__return_zero' ); 
        ```
    
 6.  [Log in to add feedback](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2F__return_zero%2F%3Freplytocom%3D1519%23feedback-editor-1519)

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