public static function valueOf($char): self
    {
        if (\is_string($char) || $char instanceof self) {
            return new static((string) $char);
        }

        throw new InvalidArgumentException('Unsupported character type!');
    }
public static function valueOf($char): self
    {
        if (\is_string($char) || $char instanceof self) {
            return new static((string) $char);
        }

        throw new InvalidArgumentException('Unsupported character type!');
    }
public static function valueOf ( $ char ) : self { if ( \ is_string ( $ char ) || $ char instanceof self ) { return new static ( ( string ) $ char ) ; } throw new InvalidArgumentException ( 'Unsupported character type!' ) ; }
Returns specified value as character

@param static|string $char
@return static
@throws InvalidArgumentException
Returns specified value as character