reference/sockets/functions/socket-last-error.xml
14dc7c47365f2b71f6c907a5ba5bccf42534d5a9
...
...
@@ -1,6 +1,6 @@
1
1
<?xml version="1.0" encoding="utf-8"?>
2
2
<!-- $Revision$ -->
3
-
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.socket-last-error">
3
+
<refentry xml:id="function.socket-last-error" xmlns="http://docbook.org/ns/docbook">
4
4
<refnamediv>
5
5
<refname>socket_last_error</refname>
6
6
<refpurpose>Returns the last error on the socket </refpurpose>
...
...
@@ -10,12 +10,12 @@
10
10
&reftitle.description;
11
11
<methodsynopsis>
12
12
<type>int</type><methodname>socket_last_error</methodname>
13
-
<methodparam choice="opt"><type>resource</type><parameter>socket</parameter></methodparam>
13
+
<methodparam choice="opt"><type class="union"><type>Socket</type><type>null</type></type><parameter>socket</parameter><initializer>&null;</initializer></methodparam>
14
14
</methodsynopsis>
15
15
<para>
16
-
If a socket resource is passed to this function, the last error which
17
-
occurred on this particular socket is returned. If the socket resource is
18
-
omitted, the error code of the last failed socket function is returned.
16
+
If a <classname>Socket</classname> instance is passed to this function, the last error which
17
+
occurred on this particular socket is returned. If <parameter>socket</parameter> is
18
+
&null;, the error code of the last failed socket function is returned.
19
19
The latter is particularly helpful for functions like
20
20
<function>socket_create</function> which don't return a socket on
21
21
failure and <function>socket_select</function> which can fail for reasons
...
...
@@ -37,7 +37,7 @@
37
37
<term><parameter>socket</parameter></term>
38
38
<listitem>
39
39
<para>
40
-
A valid socket resource created with <function>socket_create</function>.
40
+
A <classname>Socket</classname> instance created with <function>socket_create</function>.
41
41
</para>
42
42
</listitem>
43
43
</varlistentry>
...
...
@@ -52,6 +52,29 @@
52
52
</para>
53
53
</refsect1>
54
54

55
+
<refsect1 role="changelog">
56
+
&reftitle.changelog;
57
+
<informaltable>
58
+
<tgroup cols="2">
59
+
<thead>
60
+
<row>
61
+
<entry>&Version;</entry>
62
+
<entry>&Description;</entry>
63
+
</row>
64
+
</thead>
65
+
<tbody>
66
+
&sockets.changelog.socket-param;
67
+
<row>
68
+
<entry>8.0.0</entry>
69
+
<entry>
70
+
<parameter>socket</parameter> is nullable now.
71
+
</entry>
72
+
</row>
73
+
</tbody>
74
+
</tgroup>
75
+
</informaltable>
76
+
</refsect1>
77
+

55
78
<refsect1 role="examples">
56
79
&reftitle.examples;
57
80
<para>
...
...
@@ -86,7 +109,6 @@ if ($socket === false) {
86
109
</refsect1>
87
110

88
111
</refentry>
89
-

90
112
<!-- Keep this comment at the end of the file
91
113
Local variables:
92
114
mode: sgml
93
115