Bug report
Code snippet that reproduces the problem
https://phpstan.org/r/2e8de864-4363-4650-bf36-6141d67a3afb
https://phpstan.org/r/70eef2b2-0764-444d-85bd-daec2140a65a shows the problem is in array_key_exists narrowing
Expected output
The return type must be satisfied, ie. no phpstan error.
The 2nd dump must show:
-Dumped type: array<0|string, mixed>
+Dumped type: array<string, mixed>
Bug report
Code snippet that reproduces the problem
https://phpstan.org/r/2e8de864-4363-4650-bf36-6141d67a3afb
https://phpstan.org/r/70eef2b2-0764-444d-85bd-daec2140a65a shows the problem is in
array_key_existsnarrowingExpected output
The return type must be satisfied, ie. no phpstan error.
The 2nd dump must show: