note 121390 deleted from language.oop5.constants by cmb

From: Date: Tue, 22 Feb 2022 10:48:13 +0000
Subject: note 121390 deleted from language.oop5.constants by cmb
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-217641@lists.php.net to get a copy of this message
Note Submitter: Anonymous ---- Before version 7.1.0 you couldn't write something like this: <?php class foo{ private const myvar = 13; ... } ?> and an if with version_compare isn't also allowed how could i write the code for it so the class is compatible from 5.6 - 7.1.0? Also I don't understand which are the advantages of modifying the class scope of a constant because constant couldn't be change at runtime. Maybe someone could clarify this

« previous php.notes (#217641) next »