is_int

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     protected function tryingToSetStringOrIntegerToEnum($subject)

    {

        if (! is_string($subject) && ! is_int($subject)) return;



        $target = $this->subTarget ?? $this->component;
<?php         $keys = (array) $keys;



        foreach ($keys as $key => $value) {

            if (is_int($key)) {

                $this->makeErrorAssertion($value);

            } else {

                $this->makeErrorAssertion($key, $value);
<?php         $keys = (array) $keys;



        foreach ($keys as $key => $value) {

            if (is_int($key)) {

                PHPUnit::assertFalse($errors->has($value), "Component has error: $value");

            } else {

                $failed = $this->failedRules() ?: [];
<?php         if ($parameter->isVariadic()) {


            $parameters = array_merge(

                array_filter($parameters, function ($key) { return ! is_int($key); }, ARRAY_FILTER_USE_KEY),

                array_values(array_filter($parameters, function ($key) { return is_int($key); }, ARRAY_FILTER_USE_KEY))

            );
<?php             $parameters = array_merge(

                array_filter($parameters, function ($key) { return ! is_int($key); }, ARRAY_FILTER_USE_KEY),

                array_values(array_filter($parameters, function ($key) { return is_int($key); }, ARRAY_FILTER_USE_KEY))

            );



            return;
<?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;

                }