note 119714 added to language.oop5.constants

From: Date: Tue, 09 Aug 2016 07:11:43 +0000
Subject: note 119714 added to language.oop5.constants
Groups: php.notes 
Request: Send a blank email to php-notes+get-206242@lists.php.net to get a copy of this message
As of PHP 7.1 class constants may now be defined with different visibilities from the default public scope. That means, the keywords public, protected and private are now possibles. Just like this : <?php class Foo { // Public constant, but not declared explicitly const PUBLIC_CONST_A = 1; // Public declared constant public const PUBLIC_CONST_B = 2; // Protected declared constant protected const PROTECTED_CONST = 3; // Private declared constant private const PRIVATE_CONST = 4; } ---- Server IP: 72.52.91.14 Probable Submitter: 190.96.239.111 ---- Manual Page -- http://php.net/manual/en/language.oop5.constants.php Edit -- https://master.php.net/note/edit/119714 Del: integrated -- https://master.php.net/note/delete/119714/integrated Del: useless -- https://master.php.net/note/delete/119714/useless Del: bad code -- https://master.php.net/note/delete/119714/bad+code Del: spam -- https://master.php.net/note/delete/119714/spam Del: non-english -- https://master.php.net/note/delete/119714/non-english Del: in docs -- https://master.php.net/note/delete/119714/in+docs Del: other reasons-- https://master.php.net/note/delete/119714 Reject -- https://master.php.net/note/reject/119714 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#206242) next »