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                 }




                if (is_int($name)) {

                    $this->repositories[] = $repository;

                    $this->setSourceOfConfigValue($repository, 'repositories.' . array_search($repository, $this->repositories, true), $source);

                } else {
<?php                 if (!is_string($this->config[$srcType]['url'])) {

                    $this->errors[] = $srcType . '.url : should be a string, '.gettype($this->config[$srcType]['url']).' given';

                }

                if (isset($this->config[$srcType]['reference']) && !is_string($this->config[$srcType]['reference']) && !is_int($this->config[$srcType]['reference'])) {

                    $this->errors[] = $srcType . '.reference : should be a string or int, '.gettype($this->config[$srcType]['reference']).' given';

                }

                if (isset($this->config[$srcType]['reference']) && Preg::isMatch('{^\s*-}', (string) $this->config[$srcType]['reference'])) {
<?php         foreach ($array as $key => $value) {

            $lines .= str_repeat('    ', $level);

            $lines .= is_int($key) ? $key . ' => ' : '\'' . $key . '\' => ';



            if (is_array($value)) {

                if (!empty($value)) {
<?php     public static function generateRepositoryName($index, array $repo, array $existingRepos)

    {

        $name = is_int($index) && isset($repo['url']) ? Preg::replace('{^https?://}i', '', $repo['url']) : $index;

        while (isset($existingRepos[$name])) {

            $name .= '2';

        }
<?php     public function chmod($files, int $mode, int $umask = 0000, bool $recursive = false)

    {

        foreach ($this->toIterable($files) as $file) {

            if ((\PHP_VERSION_ID < 80000 || \is_int($mode)) && true !== @chmod($file, $mode & ~$umask)) {

                throw new IOException(sprintf('Failed to chmod file "%s".', $file), 0, null, $file);

            }

            if ($recursive && is_dir($file) && !is_link($file)) {
<?php     private static function convert_int_to_char_for_ctype($int)

    {

        if (!\is_int($int)) {

            return $int;

        }
<?php         $io = new BufferIO('', OutputInterface::VERBOSITY_NORMAL, new OutputFormatter(false));




        if (!is_int($expectResult)) {

            $normalizedOutput = rtrim(str_replace("\n", PHP_EOL, $expect));

            self::expectException($expectResult);

            self::expectExceptionMessage($normalizedOutput);
<?php         fseek($appOutput, 0);




        if (!is_int($expectResult)) {

            return;

        }