Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Find whether the type of a variable is string
<?php is_string(mixed $value): bool
<?php         if (!\is_array($callable)) {

            $callable = new static($callable, $callable);

        } elseif (\is_string($callable[0])) {

            $callable[0] = new static($callable[0], $callable);

        } else {

            $callable[1] = new static($callable[1], $callable);
<?php         if (null === $href) {

            $href = $label;

        }

        if (!\is_string($href)) {

            return;

        }

        if (str_starts_with($href, 'file://')) {
<?php                     $signature .= 'null';

                } elseif (\is_array($v)) {

                    $signature .= $v ? '[…'.\count($v).']' : '[]';

                } elseif (\is_string($v)) {

                    $signature .= 10 > \strlen($v) && !str_contains($v, '\\') ? "'{$v}'" : "'…".\strlen($v)."'";

                } elseif (\is_bool($v)) {

                    $signature .= $v ? 'true' : 'false';
<?php             $stub->cut = $c->cut;

            $stub->attr = $c->attr;



            if (Stub::TYPE_REF === $c->type && !$c->class && \is_string($c->value) && !preg_match('//u', $c->value)) {

                $stub->type = Stub::TYPE_STRING;

                $stub->class = Stub::STRING_BINARY;

            }
<?php                     case \is_int($v):

                    case \is_float($v):

                        continue 2;

                    case \is_string($v):

                        if ('' === $v) {

                            continue 2;

                        }
<?php         $this->decimalPoint = localeconv();

        $this->decimalPoint = $this->decimalPoint['decimal_point'];

        $this->setOutput($output ?: static::$defaultOutput);

        if (!$output && \is_string(static::$defaultOutput)) {

            static::$defaultOutput = $this->outputStream;

        }

    }
<?php             $this->outputStream = null;

            $this->lineDumper = $output;

        } else {

            if (\is_string($output)) {

                $output = fopen($output, 'w');

            }

            $this->outputStream = $output;
<?php     private function getSourceLink(string $file, int $line)

    {

        if ($fmt = $this->displayOptions['fileLinkFormat']) {

            return \is_string($fmt) ? strtr($fmt, ['%f' => $file, '%l' => $line]) : ($fmt->format($file, $line) ?: 'file://'.$file.'#L'.$line);

        }



        return false;
<?php         $options = $this->extraDisplayOptions + $this->displayOptions;



        if ($fmt = $options['fileLinkFormat']) {

            return \is_string($fmt) ? strtr($fmt, ['%f' => $file, '%l' => $line]) : $fmt->format($file, $line);

        }



        return false;
<?php     private function prepareExpectation($expected, int $filter): string

    {

        if (!\is_string($expected)) {

            $expected = $this->getDump($expected, null, $filter);

        }