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                 $value = $constant->getValue();



                if ($value instanceof BackedEnum) {

                    return is_string($value->value)

                        ? [$value->name, $value->value]

                        : [$value->name];

                }
<?php                         : [$value->name];

                }



                return is_string($value)

                    ? [$constant->name, $value]

                    : [$constant->name];

            },
<?php     {

        $passedDirectory = $input->getOption('path');



        if (! is_string($passedDirectory)) {

            return $this->inferProjectPath();

        }