W3cubDocs

/WordPress

absint( mixed $maybeint )

Convert a value to non-negative integer.

Description

Parameters

$maybeint

(mixed) (Required) Data you wish to have converted to a non-negative integer.

Return

(int) A non-negative integer.

Source

File: wp-includes/functions.php

function absint( $maybeint ) {
	return abs( intval( $maybeint ) );
}

Changelog

Version Description
2.5.0 Introduced.

More Information

Synonym of abs( intval( $foo ) );

© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/absint