[RFC] get_class() disallow null parameter

From: Date: Sun, 14 Aug 2016 11:00:15 +0000
Subject: [RFC] get_class() disallow null parameter
Groups: php.internals 
Request: Send a blank email to internals+get-95137@lists.php.net to get a copy of this message
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. cheers Dan Ack

« previous php.internals (#95137) next »