On Tue, Oct 5, 2021 at 4:08 PM Côme Chilliet <c...@chilliet.eu> wrote:
> > Why would function a(): null|false {} be legal but function b(): null|0 > would not? > > This is inconsistent to me. And adding null, then false, then true for the > sake of completeness feels like avoiding to treat the static value as type > hint subject. > I'm not opposed to having values that aren't objects. Feels like a shorthand notation of enums, or the subset thereof. ```php function getType(): 'dropdown'|'textfield'; function getExitCode(): 0|1|255; ```