floor

Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Round fractions down
<?php floor(int|float $num): float
<?php     public function sliding($size = 2, $step = 1)

    {

        $chunks = floor(($this->count() - $size) / $step) + 1;



        return static::times($chunks, fn ($number) => $this->slice(($number - 1) * $step, $size));

    }
<?php         $groups = new static;



        $groupSize = floor($this->count() / $numberOfGroups);



        $remain = $this->count() % $numberOfGroups;
<?php                 return sprintf('%s'.end($units), static::summarize($number / 1e15, $precision, $maxPrecision, $units));

        }



        $numberExponent = floor(log10($number));

        $displayExponent = $numberExponent - ($numberExponent % 3);

        $number /= pow(10, $displayExponent);
<?php         }



        $short = max(0, $length - mb_strlen($value));

        $shortLeft = floor($short / 2);

        $shortRight = ceil($short / 2);



        return mb_substr(str_repeat($pad, $shortLeft), 0, $shortLeft).
<?php             return $serverInfos;

        }



        $majorVersion = floor($this->conn->server_version / 10000);

        $minorVersion = floor(($this->conn->server_version - $majorVersion * 10000) / 100);

        $patchVersion = floor($this->conn->server_version - $majorVersion * 10000 - $minorVersion * 100);
<?php         }



        $majorVersion = floor($this->conn->server_version / 10000);

        $minorVersion = floor(($this->conn->server_version - $majorVersion * 10000) / 100);

        $patchVersion = floor($this->conn->server_version - $majorVersion * 10000 - $minorVersion * 100);



        return $majorVersion . '.' . $minorVersion . '.' . $patchVersion;
<?php         $majorVersion = floor($this->conn->server_version / 10000);

        $minorVersion = floor(($this->conn->server_version - $majorVersion * 10000) / 100);

        $patchVersion = floor($this->conn->server_version - $majorVersion * 10000 - $minorVersion * 100);



        return $majorVersion . '.' . $minorVersion . '.' . $patchVersion;

    }
<?php         if (in_array('bottom', $away)) {



            for ($y=($height-1); $y >= floor($height/2)-1; $y--) {

                for ($x=$top_x; $x < $width; $x++) {



                    $checkColor = $image->pickColor($x, $y, 'object');
<?php         if (in_array('right', $away)) {



            for ($x=($width-1); $x >= floor($width/2)-1; $x--) {

                for ($y=$top_y; $y < $bottom_y; $y++) {



                    $checkColor = $image->pickColor($x, $y, 'object');
<?php     public function floor($value)

    {

        return floor((float) $value);

    }
<?php         }



        Cache::forever('stache::timing', [

            'time' => floor((microtime(true) - $this->startTime) * 1000),

            'date' => Carbon::now()->timestamp,

        ]);
<?php     {

        $mask = '';



        if ($ones = floor($prefix / 8)) {

            $mask = str_repeat(chr(255), (int) $ones);

        }
<?php             );

        }



        return (int) \floor($interval * 1000);

    }

}