Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Rounds a float
<?php round(int|float $num, int $precision = 0, int $mode = PHP_ROUND_HALF_UP): float
<?php     public function progress()

    {

        return $this->totalJobs > 0 ? round(($this->processedJobs() / $this->totalJobs) * 100) : 0;

    }
<?php             return null;

        }



        return round(

            $this->filter($callback)->count() / $this->count() * 100,

            $precision

        );

    }
<?php                 $this->dispatcher->dispatch(new ScheduledTaskFinished(

                    $event,

                    round(microtime(true) - $start, 2)

                ));



                $this->eventsRan = true;
<?php     protected function getElapsedTime($start)

    {

        return round((microtime(true) - $start) * 1000, 2);

    }
<?php         $result = $this->client->{$method}(...$parameters);



        $time = round((microtime(true) - $start) * 1000, 2);



        if (isset($this->events)) {

            $this->event(new CommandExecuted(
<?php         $value = floatval($size);



        return round(match (true) {

            Str::endsWith($size, 'kb') => $value * 1,

            Str::endsWith($size, 'mb') => $value * 1000,

            Str::endsWith($size, 'gb') => $value * 1000000,

            Str::endsWith($size, 'tb') => $value * 1000000000,

            default => throw new InvalidArgumentException('Invalid file size suffix.'),

        });

    }
<?php         Sleep::for(1.5)->seconds();

        $end = microtime(true);



        $this->assertEqualsWithDelta(1.5, round($end - $start, 1, PHP_ROUND_HALF_DOWN), 0.03);

    }



    public function testItCanFakeSleeping()