Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:96138 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 1576 invoked from network); 25 Sep 2016 18:58:46 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 25 Sep 2016 18:58:46 -0000 Authentication-Results: pb1.pair.com smtp.mail=pierre.php@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=pierre.php@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.213.52 as permitted sender) X-PHP-List-Original-Sender: pierre.php@gmail.com X-Host-Fingerprint: 209.85.213.52 mail-vk0-f52.google.com Received: from [209.85.213.52] ([209.85.213.52:33420] helo=mail-vk0-f52.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id FC/4A-11573-36E18E75 for ; Sun, 25 Sep 2016 14:58:43 -0400 Received: by mail-vk0-f52.google.com with SMTP id z126so27873533vkd.0 for ; Sun, 25 Sep 2016 11:58:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=bDBEH26r4SicykFJb4kIVOFuVbxzrFkKYDYmLhUkPpI=; b=Hyd67dwLMQMisHr4R9JwORW9JG+4BfMUNdSeU/rhA8No9QjDULH7HfpALRHVb7RU5C j0wIVcdvIisTckJKOVv3m89hWqAccde8XD5f92g4Rc+yYqRR3mK2TLEaZjbc3adVSXpt hdFl2TSVGVkU6akQhLxqA+zRSrO3V2Ov/2TUkSXkPwn+nEKV6dhKpwwvWIXNwNnahQJe J9eBcDi9Qr/SmUehXuVK5QP8kG9aiB2YNYQwJeWriwzubznb7QMs1OvcMf4+GiqryBWF VBKzg9q7XnKsWqruJNZX3A1wMVgopvhoPN7Eb3G/ybKllkpSiZyjkhMRlT1sx9vyQw26 bZWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=bDBEH26r4SicykFJb4kIVOFuVbxzrFkKYDYmLhUkPpI=; b=OQbT2yqPymCh67XB81jqGYpR8j1uVDyIxg58i7phNNGxXepzWgtpQG3u4u3yHaWDt0 7/SKi/lPgsRXwlum9khgMclkvKvxdbmR7LVWKKFMPV+TSOvLYTELIsX4A+P2F+fFqGKv XXhv7HJhPbl3F3nXBSwGFplxBB76ExCf5c85bb0MeDzhx3FhFtDWDogCp2anlYzh9VLg L0pRMaHqd5Vn1XoNiegxzr0rM5+ezEhJnNtCFFsDfFWWlBweOzsaN38QHm0EYKiP5S2V 4bT5Fv3TJP5KFzszconJHgZZILkT8QxXY+Pfc/H+R29mA9YJHrqbIcImWVOU3H7R0Qf7 4AYg== X-Gm-Message-State: AA6/9RmSpYum1NVraTHwIZvlWRFDmIOEkr62FabgVIDnPYCgGqeoriq+Zq9vhRC6gAONFYazM6/QtqLo/9feAw== X-Received: by 10.31.98.66 with SMTP id w63mr5238395vkb.161.1474829920473; Sun, 25 Sep 2016 11:58:40 -0700 (PDT) MIME-Version: 1.0 Received: by 10.176.81.178 with HTTP; Sun, 25 Sep 2016 11:58:38 -0700 (PDT) Received: by 10.176.81.178 with HTTP; Sun, 25 Sep 2016 11:58:38 -0700 (PDT) In-Reply-To: References: <006d8ac3-df7d-8890-5b60-56fbc9e856b1@gmx.de> Date: Mon, 26 Sep 2016 01:58:38 +0700 Message-ID: To: Niklas Keller Cc: Dan Ackroyd , Christoph Becker , Leigh , PHP internals Content-Type: multipart/alternative; boundary=94eb2c091dc2839a95053d59994e Subject: Re: [PHP-DEV] [VOTE] get_class() disallow null parameter From: pierre.php@gmail.com (Pierre Joye) --94eb2c091dc2839a95053d59994e Content-Type: text/plain; charset=UTF-8 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. --94eb2c091dc2839a95053d59994e--