reference/var/functions/isset.xml
dd100db2cb8b7d7384e5daf3a1818ed090b1ad5a
...
...
@@ -11,7 +11,7 @@
11
11
<methodsynopsis>
12
12
<type>bool</type><methodname>isset</methodname>
13
13
<methodparam><type>mixed</type><parameter>var</parameter></methodparam>
14
-
<methodparam choice="opt"><type>mixed</type><parameter>...</parameter></methodparam>
14
+
<methodparam rep="repeat"><type>mixed</type><parameter>vars</parameter></methodparam>
15
15
</methodsynopsis>
16
16
<para>
17
17
Determine if a variable is considered set,
...
...
@@ -48,10 +48,10 @@
48
48
</listitem>
49
49
</varlistentry>
50
50
<varlistentry>
51
-
<term><parameter>...</parameter></term>
51
+
<term><parameter>vars</parameter></term>
52
52
<listitem>
53
53
<para>
54
-
Another variable ...
54
+
Further variables.
55
55
</para>
56
56
</listitem>
57
57
</varlistentry>
...
...
@@ -80,7 +80,7 @@ $var = '';
80
80

81
81
// This will evaluate to TRUE so the text will be printed.
82
82
if (isset($var)) {
83
-
echo "This var is set so I will print.";
83
+
echo "This var is set so I will print.", PHP_EOL;
84
84
}
85
85

86
86
// In the next examples we'll use var_dump to output
...
...
@@ -107,7 +107,8 @@ var_dump(isset($foo)); // FALSE
107
107
</para>
108
108
<para>
109
109
This also work for elements in arrays:
110
-
<informalexample>
110
+
<example>
111
+
<title>Example of <function>isset</function> with array elements</title>
111
112
<programlisting role="php">
112
113
<![CDATA[
113
114
<?php
...
...
@@ -130,14 +131,10 @@ var_dump(isset($a['cake']['a']['b'])); // FALSE
130
131
?>
131
132
]]>
132
133
</programlisting>
133
-
</informalexample>
134
+
</example>
134
135
</para>
135
136
<example>
136
137
<title><function>isset</function> on String Offsets</title>
137
-
<para>
138
-
PHP 5.4 changes how <function>isset</function> behaves
139
-
when passed string offsets.
140
-
</para>
141
138
<programlisting role="php">
142
139
<![CDATA[
143
140
<?php
...
...
@@ -151,18 +148,7 @@ var_dump(isset($expected_array_got_string['0 Mostel']));
151
148
?>
152
149
]]>
153
150
</programlisting>
154
-
&example.outputs.53;
155
-
<screen>
156
-
<![CDATA[
157
-
bool(true)
158
-
bool(true)
159
-
bool(true)
160
-
bool(true)
161
-
bool(true)
162
-
bool(true)
163
-
]]>
164
-
</screen>
165
-
&example.outputs.54;
151
+
&example.outputs;
166
152
<screen>
167
153
<![CDATA[
168
154
bool(false)
169
155