Re: [VOTE] get_class() disallow null parameter

From: Date: Sun, 25 Sep 2016 05:29:16 +0000
Subject: Re: [VOTE] get_class() disallow null parameter
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-96131@lists.php.net to get a copy of this message
Hi On Sep 24, 2016 6:02 PM, "Dan Ackroyd" <danack@basereality.com> wrote: > > Hi, > > I'm going to put the 'get_class() disallow null parameter' RFC to a > vote: > https://wiki.php.net/rfc/get_class_disallow_null_parameter > > I realise that some people might prefer to have it target 8.0, rather > than 7.2. While I appreciate that is a reasonable point of view, I > personally believe that more people are hitting this as a bug than are > using it deliberately. > > As the behaviour was altered in a point release, fixing it as a bug in > a minor release seems reasonable to me. We can agree that the behavior is debatable but I am pretty sure it is by design (for what I can remember) and can make sense (can be considered ugly but still). Also this behavior is clearly documented: http://th1.php.net/manual/en/function.get-class.php "If object is omitted when inside a class, the name of that class is returned." I am opposed to break BC because we change our mind about how clean is this behavior and I recommend the (future) RMs to veto this change. Cheers Pierre

« previous php.internals (#96131) next »