Hello Arvids,
The patch of Anthony, clearly states that this is accepted:
function foo ( int $bar = null ) { }
And this is what I called an int|null.
Lazare INEPOLOGLOU
Ingénieur Logiciel
2012/3/12 Arvids Godjuks <[email protected]>
> 2012/3/12 Lazare Inepologlou <[email protected]>
>
>> > I'm not sure about you, but I don't wanna see that kind of thing
>> eventually making it's way into the language
>>
>> Me neither. All I am saying is that, since int|null is already here from
>> the back door, I think it should be properly supported.
>>
>
> There is no int|null at the moment, and should not be. You can pass
> anything - object, array, string, bool, int, float resource, callable -
> they all are accepted and are checked in function body if it's writer wrote
> that code.
> Hint should provide a hint for a single type, or hint doesn't belong there.
>