absint() is a WordPress function that passes a string through abs() to turn any negative number into a positive and then intval() which will typecast it as an integer with the above listed “cons” for (int)/inval().
Cons:
- Currently there is no way to filter the results before passing the value to the function that queries the database
- Does not check for or return a falsey response in case of a malformed ID being passed.
- See list for (int)/intval()*
Pros:
- Can be passed as a parameter to functions that can accept functions as a parameter such as array_map()
- Can be altered as a part of core and not a language defined function.