absint

Convert a value to non-negative integer.

Description

(int) absint( (mixed) $maybeint ); 

Returns (int)

An nonnegative integer

Parameters (1)

0. $maybeint (mixed)
Data you wish to have convered to an nonnegative integer

Usage

  1. if ( !function_exists( 'absint' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-forums/bbpress/bb-includes/backpress/functions.core.php'; 
  3.  
  4. // Data you wish to have convered to an nonnegative integer 
  5. $maybeint = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = absint($maybeint); 
  9.  

Defined (1)

The function is defined in the following location(s).

/bp-forums/bbpress/bb-includes/backpress/functions.core.php  
  1. function absint( $maybeint ) { 
  2. return abs( intval( $maybeint ) );