Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Get the integer value of a variable
<?php intval(mixed $value, int $base = 10): int
<?php     protected function ensurePermissionsAreCorrect($path)

    {

        if (is_null($this->filePermission) ||

            intval($this->files->chmod($path), 8) == $this->filePermission) {

            return;

        }
<?php                         }

                    } else {

                        $result = match ($options) {

                            SORT_NUMERIC => intval($values[0]) <=> intval($values[1]),

                            SORT_STRING => strcmp($values[0], $values[1]),

                            SORT_NATURAL => strnatcmp($values[0], $values[1]),

                            SORT_LOCALE_STRING => strcoll($values[0], $values[1]),
<?php     public function integer($key, $default = 0)

    {

        return intval($this->input($key, $default));

    }
<?php     public function toInteger($base = 10)

    {

        return intval($this->value, $base);

    }
<?php             $exception = $caught;

        }



        $remainder = intval($microseconds - ((microtime(true) - $start) * 1000000));



        if (! $this->earlyReturn && $remainder > 0) {

            $this->usleep($remainder);
<?php     {

        Route::get('/foo/{id}', function (Request $request, $id) {

            return $request->hasValidSignature()

                && intval($id) === 1

                && $request->has('paramEmpty')

                && $request->has('paramEmptyString')

                && $request->query('paramWithValue') === 'value'