Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible bug in use of PHP Parser #851

Open
drrcknlsn opened this issue Feb 11, 2025 · 1 comment
Open

Possible bug in use of PHP Parser #851

drrcknlsn opened this issue Feb 11, 2025 · 1 comment

Comments

@drrcknlsn
Copy link

drrcknlsn commented Feb 11, 2025

When using first class callable syntax, a warning is thrown:

Psy Shell v0.12.4 (PHP 8.3.13 — cli) by Justin Hileman
New version is available at psysh.org/psysh (current: v0.12.4, latest: v0.12.7)
> $arr = ['1', '2', '3'];
= [
    "1",
    "2",
    "3",
  ]

> var_dump(array_map(intval(...), $arr));
PHP Warning:  Undefined property: PhpParser\Node\VariadicPlaceholder::$name in .../vendor/psy/psysh/src/CodeCleaner/PassableByReferencePass.php on line 64

Warning: Undefined property: PhpParser\Node\VariadicPlaceholder::$name in ...vendor/psy/psysh/src/CodeCleaner/PassableByReferencePass.php on line 64
array(3) {
  [0]=>
  int(1)
  [1]=>
  int(2)
  [2]=>
  int(3)
}
= null
@drrcknlsn
Copy link
Author

Possibly related to #695

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant