Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:95142 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 47244 invoked from network); 14 Aug 2016 18:01:36 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 Aug 2016 18:01:36 -0000 Authentication-Results: pb1.pair.com smtp.mail=ocramius@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=ocramius@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.41 as permitted sender) X-PHP-List-Original-Sender: ocramius@gmail.com X-Host-Fingerprint: 74.125.82.41 mail-wm0-f41.google.com Received: from [74.125.82.41] ([74.125.82.41:35440] helo=mail-wm0-f41.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id FE/AF-36656-EF1B0B75 for ; Sun, 14 Aug 2016 14:01:35 -0400 Received: by mail-wm0-f41.google.com with SMTP id f65so57743286wmi.0 for ; Sun, 14 Aug 2016 11:01:34 -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=5F6G5iBsozfxeRSjqEUGGYi73fmBlV1krAnlxawxiYE=; b=FmEGZLHYvXPraFEK+QLJx1l2n+rvEP2wO9PZGgaNQ6cZxG7Z7TYSuNFBXOrlPZuViv cqnvvI3LPSRXf24pzWMAaDoXvftX/y0cICQSHhcXbSDGpm1RJrNeL33pfRC5Tnif0cFt I9qB39rabl241Se2AIgB7bnkSkjACyIEaVQQXaqBF4zWqUwi/9478cUGRl2NVfZRYK8Q SXQVIdf5iKLt7mXsLobgFrvzS02SRt9vV+Wu9j+u8jdq0PMxviHNbtCG6yIJbzTn+xXs w0p6mMA77BNFSI/+99WLTFhWClKdFcBlVU3UczWisMHhj17M9FoO7EksjttrZIgHwMnv uW0A== 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=5F6G5iBsozfxeRSjqEUGGYi73fmBlV1krAnlxawxiYE=; b=UPGX18vlWMq8yMbhsiQqRtiCyn0yBeTCIPu/sJ3gsxVxdmye0FgtSOtATVsqi2VbwT XgdH3k5OFEY2A6Lb93Ogy5FiVpmUcQ2ovCB1koLL5xvZCVEguTC4JNnN8PPhIvdbFJkt RrVHwu+jbO+jnGAKqjyW8INpG1QGBqLHNJ9Emk0nRNCSY175uc4UgbvVoHNd4TvggA9f tUoBx/W01Rsxho/zj1gZGiW5rY2OI6RYtwZ+XWxj/3GFwnOL5HHe30PbffR6TrdpUTQ6 ZIbfflaqIwBPjIAdbkJyOd03UjDGs6W7YUymSmJKFG55mq4aO1afd61GwuhdMtW5fRfE CMaQ== X-Gm-Message-State: AEkoouvxc8SelT42Y5SxQeQEASo4SEv/3wRbB1zKmCyuTZF3Q7Dra4RTmQSt5wnhfgQtZnzw0YGMhjR/R6ff4A== X-Received: by 10.194.5.230 with SMTP id v6mr31282173wjv.92.1471197691140; Sun, 14 Aug 2016 11:01:31 -0700 (PDT) MIME-Version: 1.0 Received: by 10.194.125.242 with HTTP; Sun, 14 Aug 2016 11:01:10 -0700 (PDT) In-Reply-To: References: Date: Sun, 14 Aug 2016 20:01:10 +0200 Message-ID: To: Dan Ackroyd Cc: "internals@lists.php.net" Content-Type: multipart/alternative; boundary=047d7b5d3e0cc66075053a0be7b0 Subject: Re: [PHP-DEV] [RFC] get_class() disallow null parameter From: ocramius@gmail.com (Marco Pivetta) --047d7b5d3e0cc66075053a0be7b0 Content-Type: text/plain; charset=UTF-8 Hi Dan, On Sun, Aug 14, 2016 at 1:00 PM, Dan Ackroyd 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/ --047d7b5d3e0cc66075053a0be7b0--