1

I have an array like below:

array [
    "total" => 0,
    "seed" => 0,
    "stringKey1" => array<string, string>,
    "stringKey2" => array<string, string>,
    ...
    "stringKeyN" => array<string, string>
]

I have question about how to use Phpstan to document above array shape. the "stringKey"s are produced in run time.

I just donot know how to write down "stringKey" part of PHPStan document

1
  • Is array<string, int|array<string, string>> not sufficient? Commented Jan 4, 2023 at 9:02

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.