Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Find whether the type of a variable is integer
<?php is_int(mixed $value): bool
<?php     {

        $value = $this->get($key, $default);



        if (! is_int($value)) {

            throw new InvalidArgumentException(

                sprintf('Configuration value for key [%s] must be an integer, %s given.', $key, gettype($value))

            );
<?php     {

        if (isset($this->verbosityMap[$level])) {

            $level = $this->verbosityMap[$level];

        } elseif (! is_int($level)) {

            $level = $this->verbosity;

        }
<?php             } catch (BindingResolutionException $e) {

                throw new RuntimeException(

                    'Unable to resolve the dispatcher from the service container. Please bind it or install the illuminate/bus package.',

                    is_int($e->getCode()) ? $e->getCode() : 0, $e

                );

            }

        }
<?php                 throw $e;

            }



            throw new EntryNotFoundException($id, is_int($e->getCode()) ? $e->getCode() : 0, $e);

        }

    }
<?php                 $this->getName(), $this->transactions

            );



            throw new DeadlockException($e->getMessage(), is_int($e->getCode()) ? $e->getCode() : 0, $e);

        }
<?php                 is_string($key) ? $key : $key + 1,

                $value,

                match (true) {

                    is_int($value) => PDO::PARAM_INT,

                    is_resource($value) => PDO::PARAM_LOB,

                    default => PDO::PARAM_STR

                },
<?php             return 'null';

        } elseif ($binary) {

            return $this->escapeBinary($value);

        } elseif (is_int($value) || is_float($value)) {

            return (string) $value;

        } elseif (is_bool($value)) {

            return $this->escapeBool($value);
<?php             if (is_int($scope)) {

                [$scope, $parameters] = [$parameters, []];

            }
<?php             protected function getStorableEnumValue($enum)

            {

                if (is_string($enum) || is_int($enum)) {

                    return $enum;

                }
<?php             protected function getStorableEnumValue($enum)

            {

                if (is_string($enum) || is_int($enum)) {

                    return $enum;

                }
<?php             return false;

        }



        if (is_int($parentKey) || is_int($relatedKey)) {

            return (int) $parentKey === (int) $relatedKey;

        }
<?php             return 0;

        }



        if (is_int($result) || is_float($result)) {

            return $result;

        }
<?php         $bindings = $this->cleanBindings(array_merge(

            Arr::flatten($values, 1),

            collect($update)->reject(function ($value, $key) {

                return is_int($key);

            })->all()

        ));
<?php         if (property_exists($provider, 'singletons')) {

            foreach ($provider->singletons as $key => $value) {

                $key = is_int($key) ? $value : $key;



                $this->singleton($key, $value);

            }
<?php                 if ($e instanceof NotFoundHttpException) {

                    throw new NotFoundHttpException(

                        "{$request->method()} {$request->url()}", $e, is_int($e->getCode()) ? $e->getCode() : 0

                    );

                }