wordpress / latest / functions / absint.html

absint( mixed $maybeint ): int

Converts a value to non-negative integer.

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. View all references

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

Used By

Used By Description

Changelog

Version Description
2.5.0 Introduced.

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