is_numeric

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         $cache->delete($cachePath);



        if ($svg['width'] && $svg['height']

            && is_numeric((string) $svg['width'])

            && is_numeric((string) $svg['height'])) {

            return [(float) $svg['width'], (float) $svg['height']];

        } elseif ($svg['viewBox']) {
<?php         if ($svg['width'] && $svg['height']

            && is_numeric((string) $svg['width'])

            && is_numeric((string) $svg['height'])) {

            return [(float) $svg['width'], (float) $svg['height']];

        } elseif ($svg['viewBox']) {

            $viewBox = preg_split('/[\s,]+/', $svg['viewBox'] ?: '');
<?php     {

        $formatted = $date->format($format);



        if (is_numeric($formatted)) {

            $formatted = (int) $formatted;

        }
<?php         if ($length = $response->getHeader('Content-Length')) {

            $length = reset($length);



            if (is_numeric($length)) {

                $metadata['size'] = (int) $length;

            }

        }
<?php     public function backspace($value, $params)

    {

        if (is_array($value) || ! isset($params[0]) || ! is_numeric($params[0]) || $params[0] < 0) {

            return $value;

        }
<?php     public function isNumeric($value)

    {

        return is_numeric($value);

    }
<?php     {

        $count = Arr::get($params, 0);



        if (! is_numeric($count)) {

            $count = (int) Arr::get($context, $count);

        }
<?php     public function repeat($value, $params, $context)

    {

        $times = Arr::get($params, 0, 1);

        $times = is_numeric($times) ? $times : Arr::get($context, $times);



        $times = ($times instanceof Value) ? $times->value() : $times;
<?php         $segment = Arr::get($params, 0, 1);




        if (! is_numeric($segment)) {

            $segment = Arr::get($context, $segment);

        }
<?php         $number = (is_numeric($number))

            ? $number

            : Arr::get($context, $number, $number);
<?php     private function carbon($value)

    {

        if (! $value instanceof Carbon) {

            $value = (is_numeric($value)) ? Carbon::createFromTimestamp($value) : Carbon::parse($value);

        }



        return $value;
<?php             $redirect = optional(Facades\Entry::find($id))->url() ?? 404;

        }



        return is_numeric($redirect) ? (int) $redirect : $redirect;

    }



    private function firstChildUrl($parent)
<?php         $firstKey = array_keys($data)[0];

        reset($data);



        if (! is_numeric($firstKey)) {

            $this->is_haystack_categorized = true;

        }
<?php         }




        if (! is_numeric($one) || ! is_numeric($two)) {

            return $this->strings($one, $two);

        }
<?php         if (is_numeric($key)) {

            return $value;

        }