Re: [RFC] [Vote] var_info
| From: | Nikita Popov | Date: | Mon, 15 Aug 2016 21:17:02 +0000 |
| Subject: | Re: [RFC] [Vote] var_info | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-95212@lists.php.net to get a copy of this message | ||
On Fri, Jul 22, 2016 at 10:21 PM, Nikita Popov <nikita.ppv@gmail.com> wrote:
> On Sat, Jul 9, 2016 at 12:19 AM, Stanislav Malyshev <smalyshev@gmail.com>
> wrote:
>
>> Hi!
>>
>> > Lastly, I'll just leave this list of type-related improvements I'd
>> actually
>> > like to see:
>> > * Make is_object() return true for IncompleteClass. This is just
>> > ridiculous. I care zero about the theoretical BC impact.
>>
>> I have no idea why it doesn't do so. I'll try to dig up when it was made
>> so and see if there's some explanation.
>>
>> > * Make gettype() return 'resource (unknown type)' instead of just
>> > 'unknown type' for closed resources. This makes the output clear while
>> > still leaving the closed resource distinction.
>>
>> That makes total sense. And BC impact is rather minimal given that
>> closed resources are useless.
>>
>
> I've created PRs for both of these:
>
> gettype() on closed resources:
> https://github.com/php/php-src/pull/2022
> is_object() on Incomplete_Class:
> https://github.com/php/php-src/pull/2023
>
> Unless there are objections from core devs I'll apply both in a few days.
>
> Nikita
>
As there were no objections, I've now merged both changes:
https://github.com/php/php-src/commit/34824b70f8e72b200d77957145bb61883b03322d
https://github.com/php/php-src/commit/89f63779711f34d87c2464ae13965df868d6231f
As I forgot to handle this earlier, I went with master-only.
Nikita