Re: [VOTE] get_class() disallow null parameter
| From: | Christoph M. Becker | Date: | Sun, 25 Sep 2016 13:19:07 +0000 |
| Subject: | Re: [VOTE] get_class() disallow null parameter | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-96135@lists.php.net to get a copy of this message | ||
On 25.09.2016 at 11:29, Leigh wrote:
> On Sun, 25 Sep 2016 at 06:29 Pierre Joye <pierre.php@gmail.com> wrote:
>
>> Also this behavior is clearly documented:
>>
>> http://th1.php.net/manual/en/function.get-class.php
>>
>> "If object is omitted when inside a class, the name of that class is
>> returned."
>>
>> I am opposed to break BC because we change our mind about how clean is this
>> behavior and I recommend the (future) RMs to veto this change.
>
> This is ambiguous at best.
>
> "Omitted" and "Not omitted but set to null" are different things.
However, the changelog entry for 5.3.0 states:
| NULL became the default value for object, so passing NULL to object
| now has the same result as not passing any value.
And that's what I would expect when reading the function signature;
after all, NULL is the default value of $object.
--
Christoph M. Becker