reference/network/functions/long2ip.xml
d715365c098db000eaf7dcd987ee6093f6e83091
...
...
@@ -3,18 +3,18 @@
3
3
<refentry xml:id="function.long2ip" xmlns="http://docbook.org/ns/docbook">
4
4
<refnamediv>
5
5
<refname>long2ip</refname>
6
-
<refpurpose>Converts an (IPv4) Internet network address into a string in Internet standard dotted format</refpurpose>
6
+
<refpurpose>Converts a long integer address into a string in (IPv4) Internet standard dotted format</refpurpose>
7
7
</refnamediv>
8
8
9
9
<refsect1 role="description">
10
10
&reftitle.description;
11
11
<methodsynopsis>
12
12
<type>string</type><methodname>long2ip</methodname>
13
-
<methodparam><type>string</type><parameter>proper_address</parameter></methodparam>
13
+
<methodparam><type>int</type><parameter>ip</parameter></methodparam>
14
14
</methodsynopsis>
15
15
<para>
16
16
The function <function>long2ip</function> generates an Internet address
17
-
in dotted format (i.e.: aaa.bbb.ccc.ddd) from the proper address
17
+
in dotted format (i.e.: aaa.bbb.ccc.ddd) from the long integer
18
18
representation.
19
19
</para>
20
20
</refsect1>
...
...
@@ -24,10 +24,10 @@
24
24
<para>
25
25
<variablelist>
26
26
<varlistentry>
27
-
<term><parameter>proper_address</parameter></term>
27
+
<term><parameter>ip</parameter></term>
28
28
<listitem>
29
29
<para>
30
-
A proper address representation.
30
+
A proper address representation in long integer.
31
31
</para>
32
32
</listitem>
33
33
</varlistentry>
...
...
@@ -38,10 +38,44 @@
38
38
<refsect1 role="returnvalues">
39
39
&reftitle.returnvalues;
40
40
<para>
41
-
Returns the Internet IP address as a string.
41
+
Returns the Internet IP address as a string, &return.falseforfailure;.
42
42
</para>
43
43
</refsect1>
44
44

45
+
<refsect1 role="changelog"><!-- {{{ -->
46
+
&reftitle.changelog;
47
+
<informaltable>
48
+
<tgroup cols="2">
49
+
<thead>
50
+
<row>
51
+
<entry>&Version;</entry>
52
+
<entry>&Description;</entry>
53
+
</row>
54
+
</thead>
55
+
<tbody>
56
+
<row>
57
+
<entry>7.1.0</entry>
58
+
<entry>
59
+
The parameter type of <parameter>ip</parameter> has been
60
+
changed from <type>string</type> to <type>int</type>.
61
+
</entry>
62
+
</row>
63
+
</tbody>
64
+
</tgroup>
65
+
</informaltable>
66
+
</refsect1><!-- }}} -->
67
+

68
+
<refsect1 role="notes"><!-- {{{ -->
69
+
&reftitle.notes;
70
+
<note>
71
+
<para>
72
+
On 32-bit architectures, casting integer representations of IP addresses
73
+
from <type>string</type> to <type>int</type> will not give
74
+
correct results for numbers which exceed <constant>PHP_INT_MAX</constant>.
75
+
</para>
76
+
</note>
77
+
</refsect1><!-- }}} -->
78
+

45
79
<refsect1 role="seealso">
46
80
&reftitle.seealso;
47
81
<para>
...
...
@@ -52,7 +86,6 @@
52
86
</refsect1>
53
87

54
88
</refentry>
55
-

56
89
<!-- Keep this comment at the end of the file
57
90
Local variables:
58
91
mode: sgml
59
92