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         }

    }



    assert(isset($getopt['status-file']) && is_string($getopt['status-file']));

    $statusFile = fopen($getopt['status-file'], 'wb');

    assert(is_resource($statusFile));
<?php     $statusFile = fopen($getopt['status-file'], 'wb');

    assert(is_resource($statusFile));



    assert(isset($getopt['progress-file']) && is_string($getopt['progress-file']));

    assert(isset($getopt['unexpected-output-file']) && is_string($getopt['unexpected-output-file']));

    assert(isset($getopt['testresult-file']) && is_string($getopt['testresult-file']));

    assert(! isset($getopt['teamcity-file']) || is_string($getopt['teamcity-file']));
<?php     assert(is_resource($statusFile));



    assert(isset($getopt['progress-file']) && is_string($getopt['progress-file']));

    assert(isset($getopt['unexpected-output-file']) && is_string($getopt['unexpected-output-file']));

    assert(isset($getopt['testresult-file']) && is_string($getopt['testresult-file']));

    assert(! isset($getopt['teamcity-file']) || is_string($getopt['teamcity-file']));

    assert(! isset($getopt['testdox-file']) || is_string($getopt['testdox-file']));
<?php     assert(isset($getopt['progress-file']) && is_string($getopt['progress-file']));

    assert(isset($getopt['unexpected-output-file']) && is_string($getopt['unexpected-output-file']));

    assert(isset($getopt['testresult-file']) && is_string($getopt['testresult-file']));

    assert(! isset($getopt['teamcity-file']) || is_string($getopt['teamcity-file']));

    assert(! isset($getopt['testdox-file']) || is_string($getopt['testdox-file']));
<?php     assert(isset($getopt['progress-file']) && is_string($getopt['progress-file']));

    assert(isset($getopt['unexpected-output-file']) && is_string($getopt['unexpected-output-file']));

    assert(isset($getopt['testresult-file']) && is_string($getopt['testresult-file']));

    assert(! isset($getopt['teamcity-file']) || is_string($getopt['teamcity-file']));

    assert(! isset($getopt['testdox-file']) || is_string($getopt['testdox-file']));



    assert(isset($getopt['phpunit-argv']) && is_string($getopt['phpunit-argv']));
<?php     assert(isset($getopt['unexpected-output-file']) && is_string($getopt['unexpected-output-file']));

    assert(isset($getopt['testresult-file']) && is_string($getopt['testresult-file']));

    assert(! isset($getopt['teamcity-file']) || is_string($getopt['teamcity-file']));

    assert(! isset($getopt['testdox-file']) || is_string($getopt['testdox-file']));



    assert(isset($getopt['phpunit-argv']) && is_string($getopt['phpunit-argv']));

    $phpunitArgv = unserialize($getopt['phpunit-argv'], ['allowed_classes' => false]);
<?php     assert(! isset($getopt['teamcity-file']) || is_string($getopt['teamcity-file']));

    assert(! isset($getopt['testdox-file']) || is_string($getopt['testdox-file']));



    assert(isset($getopt['phpunit-argv']) && is_string($getopt['phpunit-argv']));

    $phpunitArgv = unserialize($getopt['phpunit-argv'], ['allowed_classes' => false]);

    assert(is_array($phpunitArgv));
<?php     public function intercept(string $name, string|Closure $filter, Closure $handler): void

    {

        if (is_string($filter)) {

            $filter = fn ($value): bool => $value instanceof $filter;

        }
<?php     public function json(): Expectation

    {

        if (! is_string($this->value)) {

            InvalidExpectationValue::expected('string');

        }
<?php         }



        foreach ($this->value as $k => $item) {

            if (is_string($k)) {

                $this->and($k)->toBeSnakeCase($message);

            }
<?php         }



        foreach ($this->value as $k => $item) {

            if (is_string($k)) {

                $this->and($k)->toBeKebabCase($message);

            }
<?php         }



        foreach ($this->value as $k => $item) {

            if (is_string($k)) {

                $this->and($k)->toBeCamelCase($message);

            }
<?php         }



        foreach ($this->value as $k => $item) {

            if (is_string($k)) {

                $this->and($k)->toBeStudlyCase($message);

            }
<?php     {

        return GroupArchExpectation::fromExpectations($this->original, array_map(fn (string $target): SingleArchExpectation => ToUse::make($this->original, $target)->opposite(

            fn () => $this->throwExpectationFailedException('toUse', $target),

        ), is_string($targets) ? [$targets] : $targets));

    }
<?php     {

        return GroupArchExpectation::fromExpectations($this->original, array_map(fn (string $target): GroupArchExpectation => ToBeUsedIn::make($this->original, $target)->opposite(

            fn () => $this->throwExpectationFailedException('toBeUsedIn', $target),

        ), is_string($targets) ? [$targets] : $targets));

    }



    public function toOnlyBeUsedIn(): never