Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:96140 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 8985 invoked from network); 25 Sep 2016 21:06:22 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 25 Sep 2016 21:06:22 -0000 Authentication-Results: pb1.pair.com smtp.mail=me@kelunik.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=me@kelunik.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain kelunik.com from 81.169.146.221 cause and error) X-PHP-List-Original-Sender: me@kelunik.com X-Host-Fingerprint: 81.169.146.221 mo4-p00-ob.smtp.rzone.de Received: from [81.169.146.221] ([81.169.146.221:25222] helo=mo4-p00-ob.smtp.rzone.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 7E/4B-11573-D4C38E75 for ; Sun, 25 Sep 2016 17:06:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1474837578; l=5963; s=domk; d=kelunik.com; h=Content-Type:Cc:To:Subject:Date:From:References:In-Reply-To: MIME-Version; bh=FYmwWdCIczHvrIzbz6G/xbFRGdBvgUWOYbHT/GYrlxE=; b=SFxSzVoLnbF2EULNNYTXgMheNte1XtqrSCB378xxuvLC3mmBy6ADsMO0OB9fzZvrT7C yRJDeUdXJRAvCW7wenZEYcRFoSTGtODuwTgvh79SpSbHhGuuI4J6Gz8DMRku2IwJfhmoA h21QH3u7Defp/Nf7/v8uld65tgcE7sUz0iE= X-RZG-AUTH: :IWkkfkWkbvHsXQGmRYmUo9mls2vWuiu+7SLGvomb4bl9EfHtO3s6 X-RZG-CLASS-ID: mo00 Received: from mail-wm0-f48.google.com ([74.125.82.48]) by smtp.strato.de (RZmta 39.3 AUTH) with ESMTPSA id L0a9des8PL6IKOk (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (curve secp384r1 with 384 ECDH bits, eq. 7680 bits RSA)) (Client did not present a certificate) for ; Sun, 25 Sep 2016 23:06:18 +0200 (CEST) Received: by mail-wm0-f48.google.com with SMTP id w84so119168414wmg.1 for ; Sun, 25 Sep 2016 14:06:18 -0700 (PDT) X-Gm-Message-State: AA6/9Rm1DXmfn+6080phvM8scpnyyEW43GzlUKJti5YjfA2D2nV0rVPaGgogD+9uNnSGre40vlmFUyWeBgSt5g== X-Received: by 10.28.174.76 with SMTP id x73mr12024382wme.60.1474837578555; Sun, 25 Sep 2016 14:06:18 -0700 (PDT) MIME-Version: 1.0 Received: by 10.28.125.132 with HTTP; Sun, 25 Sep 2016 14:06:17 -0700 (PDT) In-Reply-To: References: <006d8ac3-df7d-8890-5b60-56fbc9e856b1@gmx.de> Date: Sun, 25 Sep 2016 23:06:17 +0200 X-Gmail-Original-Message-ID: Message-ID: To: Pierre Joye Cc: Dan Ackroyd , Christoph Becker , Leigh , PHP internals Content-Type: multipart/alternative; boundary=001a11444af4f8b703053d5b61ef Subject: Re: [PHP-DEV] [VOTE] get_class() disallow null parameter From: me@kelunik.com (Niklas Keller) --001a11444af4f8b703053d5b61ef Content-Type: text/plain; charset=UTF-8 2016-09-25 20:58 GMT+02:00 Pierre Joye : > On Sep 26, 2016 12:09 AM, "Niklas Keller" wrote: > > > > 2016-09-25 15:19 GMT+02:00 Christoph M. Becker : > >> > >> On 25.09.2016 at 11:29, Leigh wrote: > >> > >> > On Sun, 25 Sep 2016 at 06:29 Pierre Joye > wrote: > >> > > >> >> 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. > >> > > >> > This is ambiguous at best. > >> > > >> > "Omitted" and "Not omitted but set to null" are different things. > >> > >> However, the changelog entry for 5.3.0 states: > >> > >> | NULL became the default value for object, so passing NULL to object > >> | now has the same result as not passing any value. > >> > >> And that's what I would expect when reading the function signature; > >> after all, NULL is the default value of $object. > > > > > > I think what matters is the documentation of the return value, not the > changelog. > > > >> Returns the name of the class of which object is an instance. Returns > FALSE if object is not an object. > >> > >> If object is omitted when inside a class, the name of that class is > returned. > > > > > > It clearly says "omitted", that's passing nothing at all. Passing `null` > doesn't omit an argument, it passes `null`. > > > >> I am opposed to break BC because we change our mind about how clean is > this > > > > > > I guess most code that might pass null is probably broken, do you have a > use case where the current behavior even makes sense? > > Probably is sadly not a fact. > > We restore it because it was breaking code. If I remember correctly it was > due to some other non existent features that allows the same (or not > working). > > All I am saying is this is a BC break with little to no value because what > willing to support 7.1+ only can simply use the alternatives. > Which alternatives? --001a11444af4f8b703053d5b61ef--