I want to round a number and I need a proper integer because I want to use it as an array key. The first \"solution\" that comes to mind is:
$key = (int)roun
To round floats properly, you can use:
Those functions return float, but from Niet the Dark Absol comment: "Integers stored within floats are always accurate, up to around 2^51, which is much more than can be stored in an int anyway."