Introducing absint() for casting to an absolute integer. see #4762
git-svn-id: https://develop.svn.wordpress.org/trunk@6222 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
67cb7b99ef
commit
3cf979dd42
@ -1432,4 +1432,13 @@ function require_wp_db()
|
||||
require_once (ABSPATH . WPINC . '/wp-db.php');
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts input to an absolute integer
|
||||
* @param mixed $maybeint data you wish to have convered to an absolute integer
|
||||
* @return int an absolute integer
|
||||
*/
|
||||
function absint($maybeint) {
|
||||
return abs(intval($maybeint));
|
||||
}
|
||||
|
||||
?>
|
||||
|
Loading…
Reference in New Issue
Block a user