*abs*function recently. Obviously, the abs function works on both integers and floats, but in my own code I know I will ONLY be dealing with integers. So my question is which of these two procedures would be quicker given the

**integer**,

*$number*

$number = abs($number);OR

if($number & 0x80000000) $number = ($number ^ 0xffffffff) + 1; // alternative approach if($number < 0) $number = ($number ^ 0xffffffff) + 1;My guess is the second one will be much quicker, but I'm not sure how PHP does things at a low level.

This post has been edited by **grimpirate**: 15 March 2009 - 02:52 PM