What is this?
– if key is string, then value must be int
– if key is int, then value must be bool
It should allow for ['foo' => 1, true]
#AskFedi #FollowerPower #amCoding #amProgramming #softwareDevelopment #softwareEngineering #PHP #PHPStan #computerScience #dataTypes #typeSystem #typeTheory #typeVariance #compositeDataTypes #dataTypeComposition
What is this? – if key is string, then value must be int – if key is int, then value must be bool It should allow for ['foo' => 1, true] #AskFedi #FollowerPower #amCoding #amProgramming #softwareDevelopment #softwareEngineering #PHP #PHPStan #computerScience #dataTypes #typeSystem #typeTheory #typ
union: array<string, int>|array<int, bool> 60%
something else (please comment) 0%
intersection: array<string, int>&array<int, bool> 40%
5 people · Closed