Open Ocramius opened 10 months ago
Hey @Ocramius, can you reproduce the issue on https://psalm.dev ?
eh, if it works well with stubs, I have no issues with that, it's not like stubs are actually read by users
I use them as main docs when touching pho code 😁
I just realized that
array_product([true, false, true, false])
(called witharray<bool>
) is amazing to find out whether all values in anarray
aretrue
:DPossibly a bit evil, but I wonder if it's something too ugly too expose, or worth documenting here:
https://github.com/vimeo/psalm/blob/64dc2ff74762ace75156b324e73c0e9e1dee7b17/stubs/CoreGenericFunctions.phpstub#L817-L829
array<true>
, the output is1
array<false>
, the output is0
array<bool>
, the output is0|1