File: string.xml

package info (click to toggle)
php-doc 20241205~git.dfcbb86%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 70,956 kB
  • sloc: xml: 968,269; php: 23,883; javascript: 671; sh: 177; makefile: 37
file content (40 lines) | stat: -rw-r--r-- 1,151 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<?xml version="1.0" encoding="utf-8"?>
<sect1 xml:id="language.operators.string">
 <title>String Operators</title>
 <titleabbrev>String</titleabbrev>
 <simpara>
  There are two <type>string</type> operators. The first is the
  concatenation operator ('.'), which returns the concatenation of its
  right and left arguments. The second is the concatenating assignment
  operator ('<literal>.=</literal>'), which appends the argument on the right side to
  the argument on the left side. Please read <link
  linkend="language.operators.assignment">Assignment
  Operators</link> for more information.
 </simpara>

 <para>
  <informalexample>
   <programlisting role="php">
<![CDATA[
<?php
$a = "Hello ";
$b = $a . "World!"; // now $b contains "Hello World!"

$a = "Hello ";
$a .= "World!";     // now $a contains "Hello World!"
?>
]]>
   </programlisting>
  </informalexample>
 </para>

 <sect2 role="seealso">
  &reftitle.seealso;
  <para>
   <simplelist>
    <member><link linkend="language.types.string">String type</link></member>
    <member><link linkend="ref.strings">String functions</link></member>
   </simplelist>
  </para>
 </sect2>
</sect1>