Supported Versions: PHP 4 >= 4.0.5, PHP 5, PHP 7, PHP 8
Finds whether a variable is a scalar
<?php is_scalar(mixed $value): bool
<?php         array $possibleTypes,

        ?Throwable $previous = null

    ) {

        if (is_scalar($value) || $value === null) {

            return new self(sprintf(

                'Could not convert PHP value %s to type %s. Expected one of the following types: %s',

                var_export($value, true),