com php-langspec: Case-insensitive constants are deprecated: spec/06-constants.md tests/constants/constants.phpt
[email protected] (Nikita Popov) Mon, 10 Sep 2018 11:47:58 +0000
| Newsgroups | php.standards.cvs |
|---|---|
| Message-ID | <[email protected]> |
Commit: ea03278e7e3d48061ef6744570b8f36b7a20d02c=0AAuthor: Nikita Pop= ov <[email protected]> Mon, 10 Sep 2018 13:47:58 +0200=0AParents= : bbbcec63be0487cad32b42b823d3da3f6057226d=0ABranches: master=0A=0ALink:= http://git.php.net/?p=3Dphp-langspec.git;a=3Dcommitdiff;h=3Dea03278e= 7e3d48061ef6744570b8f36b7a20d02c=0A=0ALog:=0ACase-insensitive constants are= deprecated=0A=0AChanged paths:=0A M spec/06-constants.md=0A M tests/co= nstants/constants.phpt=0A=0A=0ADiff:=0Adiff --git a/spec/06-constants.md b/= spec/06-constants.md=0Aindex 5670599..57720df 100644=0A--- a/spec/06-consta= nts.md=0A+++ b/spec/06-constants.md=0A@@ -14,7 +14,8 @@ Specifically:=0A = name while that for a d-constant can contain any source character.=0A - = The name of a c-constant is case-sensitive while that for a=0A d-const= ant can be case-sensitive or case-insensitive based on the=0A- value of = the third argument passed to `define`.=0A+ value of the third argument p= assed to `define`. The definition of=0A+ case-insensitive constants is d= eprecated.=0A - If `define` is able to define the given name, it returns = `TRUE`;=0A otherwise, it returns `FALSE`.=0A =0A@@ -30,7 +31,7 @@ strin= g.=0A ```PHP=0A const MAX_HEIGHT =3D 10.5; // define two (case= -sensitive) c-constants=0A const UPPER_LIMIT =3D MAX_HEIGHT;=0A-define('COE= FFICIENT_1', 2.345, TRUE); // define a case-insensitive d-constant=0A+defin= e('COEFFICIENT_1', 2.345, TRUE); // define a case-insensitive d-constant (d= eprecated)=0A define('FAILURE', FALSE, FALSE); // define a case-sensit= ive d-constant=0A ```=0A =0Adiff --git a/tests/constants/constants.phpt b/t= ests/constants/constants.phpt=0Aindex 323a521..ec48221 100644=0A--- a/tests= /constants/constants.phpt=0A+++ b/tests/constants/constants.phpt=0A@@ -184,= 6 +184,8 @@ echo "CON1: " . C3::CON1 . "\n";=09// use :: notation, as a con= st is implicitly st=0A --EXPECTF--=0A define STATUS1 succeeded; value is >1= <=0A define MIN succeeded; value is >10<=0A+=0A+Deprecated: define(): Decla= ration of case-insensitive constants is deprecated in %s on line %d=0A defi= ne MAX succeeded; value is >20<=0A define MY_PI succeeded; value is >3.1415= 926<=0A define MY_COLOR succeeded; value is >red<=0A