WordPress.org

Ready to get started?Download WordPress

Codex

Attention Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Function Reference/absint

Contents

Description

Converts a value to a non-negative integer.

Synonym of abs( intval( $foo ) ).

Usage

<?php absint$maybeint ); ?>

Parameters

$maybeint
(mixed) (required) Data you wish to have converted to a non-negative integer.
Default: None

Return Values

(int) 
A non-negative integer.

Change Log

Since: 2.5

Source File

absint() is located in wp-includes/functions.php

Related

See also index of Function Reference and index of Template Tags.