This should be the answer, from php.net comments:

// MS Excel function: Ceiling( number, significance ) 


// duplicates m$ excel's ceiling function
if( !function_exists('ceiling') )
{
    function ceiling($number, $significance = 1)
    {
        return ( is_numeric($number) && is_numeric($significance) ) ? (ceil($number/$significance)*$significance) : false;
    }
}

echo ceiling(0, 1000);     // 0
echo ceiling(1, 1);        // 1000
echo ceiling(1001, 1000);  // 2000
echo ceiling(1.27, 0.05);  // 1.30
Answer from Superbiji on Stack Overflow
🌐
W3Schools
w3schools.com › php › func_math_ceil.asp
PHP ceil() Function
ceil(number); ❮ PHP Math Reference · ★ +1 · Sign in to track progress · REMOVE ADS · PLUS · SPACES · GET CERTIFIED · FOR TEACHERS · BOOTCAMPS · CONTACT US · × · If you want to use W3Schools services as an educational institution, team or enterprise, send us an e-mail: sales@w3schools.com ·
🌐
PHP
php.net › manual › en › function.ceil.php
PHP: ceil - Manual
echo ceil(round($value * 100)) / 100; // 77.4 - OK!
🌐
Hacking with PHP
hackingwithphp.com › 4 › 6 › 1 › rounding
Rounding: ceil(), floor(), and round() – Hacking with PHP - Practical PHP
Both ceil() and floor() take just one parameter - the number to round. Ceil() takes the number and rounds it to the nearest integer above its current value, whereas floor() rounds it to the nearest integer below its current value. Here is an example: <?php $someval = 4.9; $ceiled = ceil($someval); ...
🌐
GeeksforGeeks
geeksforgeeks.org › php › php-ceil-function
PHP ceil( ) Function - GeeksforGeeks
June 22, 2023 - The ceil() function is a built-in function in PHP and is used to round a number to the nearest greater integer.
🌐
Codecademy
codecademy.com › docs › php › math functions › ceil()
PHP | Math Functions | ceil() | Codecademy
May 26, 2023 - The ceil() function returns the next highest integer value of the fractional argument.
🌐
Scaler
scaler.com › home › topics › php ceil() function
PHP ceil() Function - Scaler Topics
March 31, 2024 - The returned value is the smallest integer greater than or equal to the input number. For example, ceil(4.3) will return 5. Since its introduction in PHP 4.2.0, the ceil() function has been included as a standard part of the PHP language.
🌐
Bbminfo
bbminfo.com › php › library › math › ceil.php
PHP ceil() - PHP Math Functions - bbminfo
May 23, 2024 - Round the negative floating point number (random numbers) using ceiling math method and print the resultant in console. <?php class MathExample { public function getCeilValue() { echo("The ceiling value of -1.5698 is " . ceil(-1.5698) . "\n"); echo("The ceiling value of -1.3093 is " .
Find elsewhere
🌐
GitHub
gist.github.com › gh640 › 6d65226c6203f2cb0ebe42fbddca8ece
PHP: ceil() and floor() with precision · GitHub
function ceil(float $value, ?int $precision = null): float { if (null === $precision) { return (float)ceil($value); } if ($precision < 0) { throw new \RuntimeException('Invalid precision'); } $reg = $value + 0.5 / (10 ** $precision); return ...
🌐
w3resource
w3resource.com › php › function-reference › ceil.php
PHP ceil() function - w3resource
August 19, 2022 - The ceil() function is used to get the next highest integer value by rounding up. Version · (PHP 4 and above) Syntax · ceil (num_value) Parameter · Return value · Rounded up to the next highest integer of num_value.
🌐
Functions-Online
functions-online.com › ceil.html
test ceil online - mathmatic PHP functions - functions-online
float ceil ( float $value ) Facebook Twitter Google+ Watch out when rounding up to zero, PHP gives the answer as negative zero. $returnValue = ceil(-0.5); returns: -0 · @Ismail: Take a look at the line "your call:". There you can see, what realy is executed.
🌐
Unibo
www-db.disi.unibo.it › courses › TW › DOCS › w3schools › php › func_math_ceil.asp.html
PHP ceil() Function
"<br>"); echo(ceil(5) . "<br>"); echo(ceil(5.1) . "<br>"); echo(ceil(-5.1) . "<br>"); echo(ceil(-5.9)); ?> Run example » · The ceil() function rounds a number UP to the nearest integer, if necessary. Tip: To round a number DOWN to the nearest integer, look at the floor() function.
🌐
Quora
quora.com › What-is-the-difference-between-ceil-and-floor-in-PHP
What is the difference between ceil() and floor() in PHP? - Quora
Answer (1 of 3): The ceil() function rounds a number UP to the nearest integer. example: [code]echo(ceil(0.60) ); echo(ceil(1.40) ); Output: 1 2 [/code]The floor() function returns the largest integer value that is smaller than or equal to a ...
🌐
Educative
educative.io › answers › what-is-ceil-in-php
What is ceil() in PHP?
The ceil() function returns the smallest integer that is greater than or equal to the number whose ceiling needs to be calculated.
🌐
Plus2Net
plus2net.com › php_tutorial › php_math_ceil.php
Ceil to get next high integer of a number
$v=485; $base_m=100; $v_max=$base_m*(ceil($v/$base_m)); //$v_max equal to 500 Same way we can find out the nearest lower value of a number using floor function in php
🌐
Nestify
nestify.io › blog › up-down-round-values-in-php-ceil-floor-functions
Up and Down Round values in PHP: ceil, floor and round functions: The ultimate tutorial 2024
December 25, 2023 - If you want to obtain the next lowest integer, you can use the floor() function; if you want to obtain the next highest integer, you can use the ceil() function. To round to the nearest integer or non-integer number with the desired accuracy, use the round() function. I hope this simple guide on Up And Down Round Values In PHP: Ceil, Floor, And Round Functions helped you somehow.
🌐
Envato Tuts+
code.tutsplus.com › home › coding fundamentals
PHP round, ceil, and floor: Which One to Use? | Envato Tuts+
May 21, 2021 - So we should use ceil(). Consider another situation where you have to determine how many people can be fully fed with the available food. In this case, you only have to invite people if you are certain they can be fed with the available food without ordering anything extra. We will have to ignore the leftover food which cannot feed an adult. So we should use floor(). The PHP round() function is different from floor() and ceil() because it takes us to the nearest integer (when no precision is specified) instead of always rounding up or down.