Skip to content

Commit a08df37

Browse files
committed
Change ID for basic/advanced string interpolation
Also fix token descriptions
1 parent ae0b0ca commit a08df37

File tree

2 files changed

+20
-14
lines changed

2 files changed

+20
-14
lines changed

appendices/tokens.xml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -204,8 +204,10 @@ defined('T_FN') || define('T_FN', 10001);
204204
<row>
205205
<entry><constant>T_CURLY_OPEN</constant></entry>
206206
<entry>{$</entry>
207-
<entry><link linkend="language.types.string.parsing.complex">complex
208-
variable parsed syntax</link></entry>
207+
<entry>
208+
<link linkend="language.types.string.parsing.advanced">advanced</link>
209+
variable string interpolation
210+
</entry>
209211
</row>
210212
<row>
211213
<entry><constant>T_DEC</constant></entry>
@@ -255,8 +257,10 @@ defined('T_FN') || define('T_FN', 10001);
255257
<row>
256258
<entry><constant>T_DOLLAR_OPEN_CURLY_BRACES</constant></entry>
257259
<entry>${</entry>
258-
<entry><link linkend="language.types.string.parsing.complex">complex
259-
variable parsed syntax</link></entry>
260+
<entry>
261+
<link linkend="language.types.string.parsing.basic">basic</link>
262+
variable string interpolation
263+
</entry>
260264
</row>
261265
<row>
262266
<entry><constant>T_DOUBLE_ARROW</constant></entry>
@@ -799,8 +803,10 @@ defined('T_FN') || define('T_FN', 10001);
799803
<row>
800804
<entry><constant>T_STRING_VARNAME</constant></entry>
801805
<entry>"${a</entry>
802-
<entry><link linkend="language.types.string.parsing.complex">complex
803-
variable parsed syntax</link></entry>
806+
<entry>
807+
<link linkend="language.variables.variable">variable variables</link>
808+
to interpolate in a string
809+
</entry>
804810
</row>
805811
<row>
806812
<entry><constant>T_SWITCH</constant></entry>

language/types/string.xml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -692,8 +692,8 @@ EOT;
692692

693693
<simpara>
694694
There are two types of syntax: a
695-
<link linkend="language.types.string.parsing.simple">basic</link> one and an
696-
<link linkend="language.types.string.parsing.complex">advanced</link> one.
695+
<link linkend="language.types.string.parsing.basic">basic</link> one and an
696+
<link linkend="language.types.string.parsing.advanced">advanced</link> one.
697697
The basic syntax is the most common and convenient. It provides a way to
698698
embed a variable, an <type>array</type> value, or an <type>object</type>
699699
property in a <type>string</type> with a minimum of effort.
@@ -704,7 +704,7 @@ EOT;
704704
curly braces surrounding the expression.
705705
</simpara>
706706

707-
<sect4 xml:id="language.types.string.parsing.simple">
707+
<sect4 xml:id="language.types.string.parsing.basic">
708708
<title>Basic syntax</title>
709709

710710
<simpara>
@@ -800,7 +800,7 @@ string(3) "bar"
800800
]]>
801801
</screen>
802802
</informalexample>
803-
The <link linkend="language.types.string.parsing.complex">advanced</link>
803+
The <link linkend="language.types.string.parsing.advanced">advanced</link>
804804
string interpolation syntax should be used instead.
805805
</para>
806806
</warning>
@@ -868,7 +868,7 @@ He drank some purple juice.
868868
The basic syntax does not permit access to an array entry which has a key
869869
containing a minus (<literal>-</literal>) sign.
870870
Attempting to do will result in a parse error. The
871-
<link linkend="language.types.string.parsing.complex">advanced</link>
871+
<link linkend="language.types.string.parsing.advanced">advanced</link>
872872
syntax must be used instead.
873873
<informalexample>
874874
<programlisting role="php">
@@ -893,7 +893,7 @@ Parse error: syntax error, unexpected token "-", expecting "]" in file on line 3
893893
<simpara>
894894
Because the array key is unquoted, it is not possible to refer to a
895895
constant with the basic syntax. Use the
896-
<link linkend="language.types.string.parsing.complex">advanced</link>
896+
<link linkend="language.types.string.parsing.advanced">advanced</link>
897897
syntax instead.
898898
</simpara>
899899
</note>
@@ -998,12 +998,12 @@ Fatal error: Uncaught Error: Object of class A could not be converted to string
998998

999999
<simpara>
10001000
For anything more complex, the
1001-
<link linkend="language.types.string.parsing.complex">advanced</link>
1001+
<link linkend="language.types.string.parsing.advanced">advanced</link>
10021002
syntax must be used.
10031003
</simpara>
10041004
</sect4>
10051005

1006-
<sect4 xml:id="language.types.string.parsing.complex">
1006+
<sect4 xml:id="language.types.string.parsing.advanced">
10071007
<title>Advanced (curly) syntax</title>
10081008

10091009
<simpara>

0 commit comments

Comments
 (0)