com php-langspec: Reflect changes for RFC: Deprecate and Remove Bareword (Unquoted) Strings: spec/07-variables.md spec/10-expressions.md tests/functions/basics.phpt tests/functions/order_of_evalua tion.phpt tests/variables/variable_names.phpt

[email protected] (Nikita Popov) Tue, 28 Mar 2017 22:28:22 +0000
Newsgroups php.standards.cvs
Message-ID <[email protected]>
Commit:    40ac5c13bc2fd35a09b76aed564f70cd062ac5c3=0AAuthor:    Rowan Coll=
ins <[email protected]>         Sun, 5 Mar 2017 19:46:34 +0000=0AComm=
itter: Nikita Popov <[email protected]>      Wed, 29 Mar 2017 00:28:22 +=
0200=0AParents:   22020fb79ec8f9a0cf33d947d5e0f76c38a86fb1=0ABranches:  mas=
ter=0A=0ALink:       http://git.php.net/?p=3Dphp-langspec.git;a=3Dcommitdif=
f;h=3D40ac5c13bc2fd35a09b76aed564f70cd062ac5c3=0A=0ALog:=0AReflect changes =
for RFC: Deprecate and Remove Bareword (Unquoted) Strings=0A=0Ahttps://wiki=
.php.net/rfc/deprecate-bareword-strings=0A=0AChanged paths:=0A  M  spec/07-=
variables.md=0A  M  spec/10-expressions.md=0A  M  tests/functions/basics.ph=
pt=0A  M  tests/functions/order_of_evaluation.phpt=0A  M  tests/variables/v=
ariable_names.phpt=0A=0A=0ADiff:=0Adiff --git a/spec/07-variables.md b/spec=
/07-variables.md=0Aindex 58fdf9e..990f0bc 100644=0A--- a/spec/07-variables.=
md=0A+++ b/spec/07-variables.md=0A@@ -52,7 +52,7 @@ and is a non-modifiable=
 lvalue.=0A =0A Undefined constants are not defined implicitly -- forward u=
sages of constants are also classified as undefined constants here. A disti=
nction between class/interface constants and top level constants is made.=
=0A =0A-For top level constants: For unqualified usages, the name of the un=
defined constant (as string) is used as substitution value. Moreover, a not=
ice is emitted stating that the corresponding constant was undefined. For q=
ualified usages, an exception of type [`Error`](14-classes.md#class-error) =
is thrown.=0A+For top level constants: For unqualified usages, the name of =
the undefined constant (as string) is used as substitution value. Moreover,=
 a warning is emitted stating that the corresponding constant was undefined=
. For qualified usages, an exception of type [`Error`](14-classes.md#class-=
error) is thrown.=0A =0A For class/interface constants: An exception of typ=
e [`Error`](14-classes.md#class-error) is thrown, stating that the correspo=
nding constant was undefined.=0A =0A@@ -66,18 +66,18 @@ define('FAILURE', T=
RUE);=0A =0A // Examples of undefined constants=0A echo NON_EXISTING_CONSTA=
NT;     // uses 'NON_EXISTING_CONSTANT' as substitution=0A-                =
                // value and emits a notice stating that the=0A+           =
                     // value and emits a warning stating that the=0A      =
                           // constant was undefined.=0A =0A echo NON_EXIST=
ING_CONSTANT;     // same here, the constant is still undefined =0A        =
                         // and 'NON_EXISTING_CONSTANT' is used as =0A-    =
                            // substitution value and a notice is emitted =
=0A+                                // substitution value and a warning is =
emitted =0A                                 // again.=0A =0A echo MAX_LENGT=
H;                // same here due to a forward usage =0A                  =
               // (MAX_LENGTH is defined further below).=0A                =
                 // 'MAX_LENGTH' is used as substitution =0A-              =
                  // value and an notice is emitted.=0A+                   =
             // value and a warning is emitted.=0A =0A echo \NON_EXISTING_C=
ONSTANT;    // qualified use of undefined constant. Throws=0A              =
                   // an exception of type Error.=0Adiff --git a/spec/10-ex=
pressions.md b/spec/10-expressions.md=0Aindex e90b47e..f886082 100644=0A---=
 a/spec/10-expressions.md=0A+++ b/spec/10-expressions.md=0A@@ -3540,7 +3540=
,7 @@ class Bar{=0A     include 'include.php';=0A   }=0A }=0A-echo X;      =
          // emits a notice: Use of undefined constant X ...=0A+echo X;    =
            // emits a warning: Use of undefined constant X ...=0A echo \fo=
o\X;           // same as above since the inclusion did not happen yet=0A $=
bar =3D new Bar();=0A $bar->bar();=0Adiff --git a/tests/functions/basics.ph=
pt b/tests/functions/basics.phpt=0Aindex 58bbc4b..c6d7ad6 100644=0A--- a/te=
sts/functions/basics.phpt=0A+++ b/tests/functions/basics.phpt=0A@@ -82,12 +=
82,12 @@ echo strlen("abcedfg")."\n";=0A f1: # arguments passed is 0=0A NUL=
L=0A =0A-Notice: Use of undefined constant f1 - assumed 'f1' in %s/function=
s/basics.php on line 30=0A+Warning: Use of undefined constant f1 - assumed =
'f1' (this will throw an Error in a future version of PHP) in %s/functions/=
basics.php on line 30=0A =0A-Notice: Use of undefined constant f1 - assumed=
 'f1' in %s/functions/basics.php on line 31=0A+Warning: Use of undefined co=
nstant f1 - assumed 'f1' (this will throw an Error in a future version of P=
HP) in %s/functions/basics.php on line 31=0A string(2) "f1"=0A =0A-Notice: =
Use of undefined constant f1 - assumed 'f1' in %s/functions/basics.php on l=
ine 32=0A+Warning: Use of undefined constant f1 - assumed 'f1' (this will t=
hrow an Error in a future version of PHP) in %s/functions/basics.php on lin=
e 32=0A f1: # arguments passed is 0=0A f1: # arguments passed is 0=0A f1: #=
 arguments passed is 1=0A@@ -107,7 +107,7 @@ f2: $p1 =3D 10, $p2 =3D 20=0A =
f2: $p1 =3D 10, $p2 =3D 20=0A 5 squared =3D 25=0A =0A-Notice: Use of undefi=
ned constant square - assumed 'square' in %s/functions/basics.php on line 7=
4=0A+Warning: Use of undefined constant square - assumed 'square' (this wil=
l throw an Error in a future version of PHP) in %s/functions/basics.php on =
line 74=0A string(6) "square"=0A float(5.29)=0A 7=0Adiff --git a/tests/func=
tions/order_of_evaluation.phpt b/tests/functions/order_of_evaluation.phpt=
=0Aindex f1ac1e7..220c2f4 100644=0A--- a/tests/functions/order_of_evaluatio=
n.phpt=0A+++ b/tests/functions/order_of_evaluation.phpt=0A@@ -53,11 +53,11 =
@@ $funcTable[$i++]($i, ++$i, $i, $i =3D 12, --$i);=09// function designato=
r side effec=0A --EXPECTF--=0A f: $p1 =3D 0, $p2 =3D 1, $p3 =3D 1, $p4 =3D =
12, $p5 =3D 11=0A =0A-Notice: Use of undefined constant f - assumed 'f' in =
%s/functions/order_of_evaluation.php on line 34=0A+Warning: Use of undefine=
d constant f - assumed 'f' (this will throw an Error in a future version of=
 PHP) in %s/functions/order_of_evaluation.php on line 34=0A =0A-Notice: Use=
 of undefined constant g - assumed 'g' in %s/functions/order_of_evaluation.=
php on line 34=0A+Warning: Use of undefined constant g - assumed 'g' (this =
will throw an Error in a future version of PHP) in %s/functions/order_of_ev=
aluation.php on line 34=0A =0A-Notice: Use of undefined constant h - assume=
d 'h' in %s/functions/order_of_evaluation.php on line 34=0A+Warning: Use of=
 undefined constant h - assumed 'h' (this will throw an Error in a future v=
ersion of PHP) in %s/functions/order_of_evaluation.php on line 34=0A array(=
3) {=0A   [0]=3D>=0A   string(1) "f"=0Adiff --git a/tests/variables/variabl=
e_names.phpt b/tests/variables/variable_names.phpt=0Aindex e50b92b..26f467f=
 100644=0A--- a/tests/variables/variable_names.phpt=0A+++ b/tests/variables=
/variable_names.phpt=0A@@ -54,7 +54,7 @@ int(99)=0A int(100)=0A int(101)=0A=
 =0A-Notice: Use of undefined constant total - assumed 'total' in %s/variab=
les/variable_names.php on line 25=0A+Warning: Use of undefined constant tot=
al - assumed 'total' (this will throw an Error in a future version of PHP) =
in %s/variables/variable_names.php on line 25=0A array(12) {=0A   ["argc"]=
=3D>=0A   int(1)=0A