Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:87946 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 66264 invoked from network); 27 Aug 2015 18:30:07 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 27 Aug 2015 18:30:07 -0000 Received: from [127.0.0.1] ([127.0.0.1:21271]) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ECSTREAM id 38/60-59374-E275FD55 for ; Thu, 27 Aug 2015 14:30:07 -0400 Authentication-Results: pb1.pair.com header.from=sean@siobud.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=sean@siobud.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain siobud.com designates 104.236.58.159 as permitted sender) X-PHP-List-Original-Sender: sean@siobud.com X-Host-Fingerprint: 104.236.58.159 siobud.com Received: from [104.236.58.159] ([104.236.58.159:14228] helo=siobud.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C3/20-59374-D2A4FD55 for ; Thu, 27 Aug 2015 13:34:37 -0400 Received: from 3006.local (c-73-8-76-141.hsd1.il.comcast.net [73.8.76.141]) by siobud.com (Postfix) with ESMTPSA id 4528BD7CED for ; Thu, 27 Aug 2015 17:34:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=siobud.com; s=mail; t=1440696875; bh=2jekrlJ78EUqY4wgtyUMR6dCx1Yrwq6zeQzGv1aVwLY=; h=Date:From:To:Subject; b=CNK5JV0y7fTfp8W66nZKFtR2VrXwltycJtL1c/748QvB/C3wCmCIEtGDT7L7dGwxW 7+sOiDhrhmYVGvHDywyV2BUtGP5S4Ct/JD7rcD46F/LBDb67rUdBV62beSEhBFK3Ie bNFRyU1A22g92J7FSGCEoB7tB96WA3jGad+aNhY8= Date: Thu, 27 Aug 2015 12:34:32 -0500 To: internals@lists.php.net Message-ID: <20150827173432.GA71000@3006.local> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) Subject: [RFC] [Concept] Class Constant visibility modifiers in PHP 7.1+ From: sean@siobud.com (Sean DuBois) Hey all, I am starting this discussion to get peoples opinion on the overall feature, and find someone who would be interested in watching over my progress and making sure I do the right things to hopefully get this merged. The PHP bug tracker contains a few simple entries for a adding visibility modifiers to class constants. https://bugs.php.net/bug.php?id=27022 I would be the one implementing this, and have a basic working version already (that takes shortcuts like reusing property_info) but it works! https://github.com/Sean-Der/php-src/compare/master...bug-69980-class-constants#diff-6231c13c8582758f41a5e2a015e3b5c5R1 There are cases where runtime/compile time checks pass/fail incorrectly, but working on that now. This change would involve breaking the API, but wouldn't involved any language breaking changes. All current const declarations would just default to public and keep the same behavior. thanks!