Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Round fractions up
<?php ceil(int|float $num): float
<?php public function splitIn($numberOfGroups)
{
return $this->chunk(ceil($this->count() / $numberOfGroups));
}
<?php public function splitIn($numberOfGroups)
{
return $this->chunk(ceil($this->count() / $numberOfGroups));
}
<?php $this->total = $total;
$this->perPage = (int) $perPage;
$this->lastPage = max((int) ceil($total / $perPage), 1);
$this->path = $this->path !== '/' ? rtrim($this->path, '/') : $this->path;
$this->currentPage = $this->setCurrentPage($currentPage, $this->pageName);
$this->items = $items instanceof Collection ? $items : Collection::make($items);
<?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).
$value.
<?php while (($len = strlen($string)) < $length) {
$size = $length - $len;
$bytesSize = (int) ceil($size / 3) * 3;
$bytes = random_bytes($bytesSize);
<?php $newMin = 127;
$newMax = 0;
return ceil(((($input- $oldMin) * ($newMax - $newMin)) / ($oldMax - $oldMin)) + $newMin);
}
}
<?php if (in_array('top', $away)) {
for ($y=0; $y < ceil($height/2); $y++) {
for ($x=0; $x < $width; $x++) {
$checkColor = $image->pickColor($x, $y, 'object');
<?php if (in_array('left', $away)) {
for ($x=0; $x < ceil($width/2); $x++) {
for ($y=$top_y; $y < $height; $y++) {
$checkColor = $image->pickColor($x, $y, 'object');
<?php protected function getPointSize()
{
return intval(ceil($this->size * 0.75));
}
<?php switch (strtolower($this->align)) {
case 'center':
$posx = ceil($posx - ($width / 2));
break;
case 'right':
<?php break;
case 'right':
$posx = ceil($posx - $width) + 1;
break;
}
<?php switch (strtolower($this->valign)) {
case 'center':
case 'middle':
$posy = ceil($posy - ($height / 2));
break;
case 'top':
<?php break;
case 'top':
$posy = ceil($posy - $top_correction);
break;
default:
<?php throw ValidationException::withMessages([
$this->username() => [Lang::get('auth.throttle', [
'seconds' => $seconds,
'minutes' => ceil($seconds / 60),
])],
])->status(Response::HTTP_TOO_MANY_REQUESTS);
}
<?php public function ceil($value)
{
return ceil((float) $value);
}