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.


Top ↑

Return

(int) A non-negative integer.


Top ↑

Source

File: wp-includes/functions.php

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

Top ↑

Changelog

Version Description
2.5.0 Introduced.

Top ↑

More Information

Synonym of abs( intval( $foo ) );