如何使用PHP将分数舍入到下一个数字

I know about php's built in round() function, which return 2 for 1.6. But it return 1 for 1.1. I want to return the next number if the given number has a fractional part. For example, I want to return 2 for 1.1, or 1.01, or even 1.0001. But I don't want to return the same for 1.0, which may return 1 itself. How can I achieve this in PHP?

Take a look at php's ceil().

echo ceil(4.3);    // 5
echo ceil(9.999);  // 10
echo ceil(-3.14);  // -3

Use ceil() to round up to the next number

echo ceil(1.0); // will echo 1

http://www.php.net/manual/en/function.ceil.php