Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Finds whether a variable is a number or a numeric string
<?php is_numeric(mixed $value): bool
<?php             $rawVal = isset($rawContents[$key]) ? $rawContents[$key] : null;



            if (is_array($value) && (!is_numeric(key($value)) || ($key === 'repositories' && null === $k))) {

                $k .= Preg::replace('{^config\.}', '', $key . '.');

                $this->listConfiguration($value, $rawVal, $output, $k, $showSource);

                $k = $origK;
<?php                             return false;

                        }



                        if (is_numeric($selection) && isset($matches[(int) $selection])) {

                            $package = $matches[(int) $selection];



                            return $package['name'];
<?php             }

        }



        if ($requestedChannel && is_numeric($requestedChannel) && strpos($latestStable['version'], $requestedChannel) !== 0) {

            $io->writeError('<warning>Warning: You forced the install of '.$latestVersion.' via --'.$requestedChannel.', but '.$latestStable['version'].' is the latest stable version. Updating to it via composer self-update --stable is recommended.</warning>');

        }
<?php         }



        $channelString = $versionsUtil->getChannel();

        if (is_numeric($channelString)) {

            $channelString .= '.x';

        }
<?php                     if ($index === $repo) {

                        continue;

                    }

                    if (is_numeric($index) && ($val === array('packagist' => false) || $val === array('packagist.org' => false))) {

                        unset($config['repositories'][$index]);

                        $config['repositories']['packagist.org'] = false;

                        break;
<?php         if (is_array($data)) {

            reset($data);



            if (is_numeric(key($data))) {

                foreach ($data as $key => $val) {

                    $data[$key] = $this->format($val, $depth + 1);

                }
<?php     private function dumpValues(PackageInterface $package, array $keys, array $data)

    {

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

            if (is_numeric($method)) {

                $method = $key;

            }
<?php         $pass = true;

        foreach ($this->config[$property] as $key => $value) {

            if (!is_string($value) && !is_numeric($value)) {

                $this->errors[] = $property.'.'.$key.' : must be a string or int, '.gettype($value).' given';

                unset($this->config[$property][$key]);

                $pass = false;
<?php         $this->config = $config['package'];




        if (!is_numeric(key($this->config))) {

            $this->config = array($this->config);

        }

    }
<?php         $channelFile = $this->config->get('home').'/update-channel';

        $this->channel = $channel;

        file_put_contents($channelFile, (is_numeric($channel) ? 'stable' : $channel).PHP_EOL);

    }
<?php         $this->rfs = new RemoteFilesystem($io, $config, $options, $disableTls);



        if (is_numeric($maxJobs = Platform::getEnv('COMPOSER_MAX_PARALLEL_HTTP'))) {

            $this->maxJobs = max(1, min(50, (int) $maxJobs));

        }

    }