[prev in list] [next in list] [prev in thread] [next in thread] 

List:       php-internals
Subject:    Re: [PHP-DEV] [RFC] [Vote] var_info
From:       Nikita Popov <nikita.ppv () gmail ! com>
Date:       2016-07-22 20:21:19
Message-ID: CAF+90c_4S7XyhhJ1C8iRjGFxnHUMrfNHMUni+0rBOBwKQHg2_g () mail ! gmail ! com
[Download RAW message or body]


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


>  * Normalize error message. IIRC currently our type error messages are
> > really weird, in that they use terms like "integer" which are not
> actually
> > valid type hints (or have different meaning). Fixing this doesn't even
> need
> > a proposal, just a PR.
>
> Right. But ensure tests are fixed, that's probably where one has to
> spend some time on cleaning it up.
>
> --
> Stas Malyshev
> smalyshev@gmail.com
>


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic