WordPress.org

Make WordPress Core

Changeset 6222


Ignore:
Timestamp:
10/10/2007 10:11:18 PM (11 years ago)
Author:
markjaquith
Message:

Introducing absint() for casting to an absolute integer. see #4762

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/functions.php

    r6198 r6222  
    14331433}
    14341434
     1435/**
     1436 * Converts input to an absolute integer
     1437 * @param mixed $maybeint data you wish to have convered to an absolute integer
     1438 * @return int an absolute integer
     1439 */
     1440function absint($maybeint) {
     1441    return abs(intval($maybeint));
     1442}
     1443
    14351444?>
Note: See TracChangeset for help on using the changeset viewer.