Hi Dan, On Sun, Aug 14, 2016 at 1:00 PM, Dan Ackroyd <dan...@basereality.com> wrote:
> Hi! > > Following an earlier discussion in January, here is a small RFC to > change get_class() to disallow null being passed as parameter. > > https://wiki.php.net/rfc/get_class_disallow_null_parameter > > Allowing null to be passed to get_class() is a 'gotcha' that is almost > always a mistake in someone's code. > > By preventing null being passed, get_class() will be far more likely > to do what people think it should do, and so result in fewer bugs in > code. > > This RFC is a small change and so is appropriate for a point release. > Other ways of making this function behave as people expect it to are > not as small changes, and are probably not appropriate for point > releases. > Thanks for bringing up this: every scenario where `null` has been passed to `get_class()` was a bug, in my work context, so I'm really happy to see this patch going in. Still, can any of the release managers throw their opinion at the RFC? This is a SemVer violation, but it doesn't seem like PHP follows SemVer closely, so I'm a bit confused about whether this can target 7.x. Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/