Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Find whether the type of a variable is string
is_string(mixed $value): bool
        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);
        if (null === $href) {

            
$href $label;

        }

        if (!
\is_string($href)) {

            return;

        }

        if (
str_starts_with($href'file://')) {
                    $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';
            $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;

            }
                    case \is_int($v):

                    case 
\is_float($v):

                        continue 
2;

                    case 
\is_string($v):

                        if (
'' === $v) {

                            continue 
2;

                        }
        $this->decimalPoint localeconv();

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

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

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

            static::
$defaultOutput $this->outputStream;

        }

    }
            $this->outputStream null;

            
$this->lineDumper $output;

        } else {

            if (
\is_string($output)) {

                
$output fopen($output'w');

            }

            
$this->outputStream $output;
    private function getSourceLink(string $fileint $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;
        $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;
    private function prepareExpectation($expectedint $filter): string

    
{

        if (!
\is_string($expected)) {

            
$expected $this->getDump($expectednull$filter);

        }