com php-langspec: Fix more undefined constant uses: tests/functions/order_of_evaluation.phpt tests/variable s/variable_names.phpt
[email protected] (Nikita Popov) Mon, 08 Apr 2019 07:06:18 +0000
| Newsgroups | php.standards.cvs |
|---|---|
| Message-ID | <[email protected]> |
Commit: 64dd279d2829244050bb099f65a987c50324b8f5=0AAuthor: Nikita Pop= ov <[email protected]> Mon, 8 Apr 2019 09:05:15 +0200=0AParents:= 5fc96c5dfd962ef25a362fc6108acae39cf9f1fd=0ABranches: master=0A=0ALink: = http://git.php.net/?p=3Dphp-langspec.git;a=3Dcommitdiff;h=3D64dd279d2= 829244050bb099f65a987c50324b8f5=0A=0ALog:=0AFix more undefined constant use= s=0A=0AChanged paths:=0A M tests/functions/order_of_evaluation.phpt=0A M= tests/variables/variable_names.phpt=0A=0A=0ADiff:=0Adiff --git a/tests/fu= nctions/order_of_evaluation.phpt b/tests/functions/order_of_evaluation.phpt= =0Aindex 220c2f4..356b10f 100644=0A--- a/tests/functions/order_of_evaluatio= n.phpt=0A+++ b/tests/functions/order_of_evaluation.phpt=0A@@ -34,9 +34,9 @@= function h($p1, $p2, $p3, $p4, $p5)=0A =0A // Create a table of function d= esignators=0A =0A-$funcTable =3D array(f, g, h);=09// list of 3 functions= =0A-var_dump($funcTable);=09=09=09// array of 3 strings=0A-var_dump($funcTa= ble[0]);=09=09// a string=0A+$funcTable =3D array("f", "g", "h"); // list = of 3 functions=0A+var_dump($funcTable);=09=09=09 // array of 3 strings= =0A+var_dump($funcTable[0]);=09=09 // a string=0A =0A // Call all 3 func= tions indirectly through table=0A =0A@@ -52,12 +52,6 @@ $funcTable[$i++]($i= , ++$i, $i, $i =3D 12, --$i);=09// function designator side effec=0A // g: = $p1 =3D 2, $p2 =3D 3, $p3 =3D 3, $p4 =3D 12, $p5 =3D 11=0A --EXPECTF--=0A f= : $p1 =3D 0, $p2 =3D 1, $p3 =3D 1, $p4 =3D 12, $p5 =3D 11=0A-=0A-Warning: U= se of undefined constant f - assumed 'f' (this will throw an Error in a fut= ure version of PHP) in %s/functions/order_of_evaluation.php on line 34=0A-= =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_evaluation.php o= n line 34=0A-=0A-Warning: Use of undefined constant h - assumed 'h' (this w= ill throw an Error in a future version of PHP) in %s/functions/order_of_eva= luation.php on line 34=0A array(3) {=0A [0]=3D>=0A string(1) "f"=0Adiff= --git a/tests/variables/variable_names.phpt b/tests/variables/variable_nam= es.phpt=0Aindex 26f467f..d236317 100644=0A--- a/tests/variables/variable_na= mes.phpt=0A+++ b/tests/variables/variable_names.phpt=0A@@ -25,7 +25,7 @@ ${= TRUE} =3D 104;=0A ${FALSE} =3D 105;=0A ${NULL} =3D 106;=0A =0A-${total} =3D= 1000;=09=09// allowed after warning: Use of undefined constant total - ass= umed 'total'=0A+//${total} =3D 1000;=09=09// disallowed; undefined constant= total=0A //${t o tal} =3D 1000;=09// disallowed; ill-formed expression=0A = //${+} =3D 1000;=09=09=09// disallowed; ill-formed expression=0A ${10 + 4} = =3D 1000;=09=09// allowed=0A@@ -53,9 +53,7 @@ print_globals();=0A int(99)= =0A int(100)=0A int(101)=0A-=0A-Warning: Use of undefined constant total - = 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+array(11) {=0A = ["argc"]=3D>=0A int(1)=0A ["v"]=3D>=0A@@ -70,8 +68,6 @@ array(12) {=0A= int(104)=0A [""]=3D>=0A int(106)=0A- ["total"]=3D>=0A- int(1000)= =0A [14]=3D>=0A int(1000)=0A ["abxy"]=3D>=0A