On Fri, Jul 8, 2016 at 9:49 PM, Fleshgrinder <p...@fleshgrinder.com> wrote:
> Hi! > > Voting on var_info has opened and will stay open until 2016-07-22: > > https://wiki.php.net/rfc/var_info > Not a big fan of this in general (imho belongs in userland), but I'd like to comment on one specific issue: You are doing a callability check for all arrays and strings. I wouldn't be comfortable passing any data that potentially derives from external sources (aka all data) to that function. E.g. this could trigger autoloading on user-provided values -- while we have some protections in place to avoid the most egregious security vulnerabilities, I wouldn't be comfortable with that. There probably other funky things that can happen here. 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. * 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. * 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. Regards, Nikita