Skip to content

Type Changes For String When Indexed #207

Description

@Disservin

PHPantom version

phpantom_lsp 0.8.0-83-g719ffd78

Installation method

Built from source

Operating system

macOS aarch64 (Apple Silicon)

Editor

VS Code

Bug description

When you access a string phpantom starts to think it's an array and starts treating it as an array, even though it's still a string.

Argument 1 ($string) expects string, got array<int, string> in the bin2hex call.

Steps to reproduce

<?php

$x = "abc";

$x[0] = "z";

echo bin2hex($x);

Error output or panic trace


.phpantom.toml

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions