On Tue, Apr 26, 2016 at 1:34 PM, Fleshgrinder <p...@fleshgrinder.com> wrote:
> On 4/26/2016 9:13 PM, Bob Weinand wrote:
>> There's undefined (= not a value) and there's the value null. We just don't 
>> expose undefined to userland. [You see it when accessing undefined 
>> variables, which PHP converts to null with a notice for example.]
>>
>> Null is definitely a value. You can pass it around, reflect on it, assign it 
>> etc..
>> And as it is a value, it also has a type, which is null.
>>
>> Null is not special, it just has specific behavior, like any other primitive 
>> type has. The only special thing is that it's allowed as a default value 
>> with function (Foo $foo = null), but this should be somewhen deprecated and 
>> removed once we have proper null unions.
>>
>> If you want to continue arguing, please open a new thread, but don't 
>> side-track this thread to much, please.
>>
>> Bob
>>
>
> Null is a type, no argument there!
>
> Deprecation of null as default value makes no sense, nor does it make
> sense to deprecate 42 as default value. ;)
>
> --
> Richard "Fleshgrinder" Fussenegger
>

I think he meant to post a different case:

    function (Foo $foo = null, $concrete_param);

This is based on a conversation I've had with him elsewhere.

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to