reference/math/functions/hexdec.xml
86e6094e86b84a51d00ab217ac50ce8dde33d82a
...
...
@@ -8,7 +8,7 @@
8
8
<refsect1 role="description">
9
9
&reftitle.description;
10
10
<methodsynopsis>
11
-
<type>number</type><methodname>hexdec</methodname>
11
+
<type class="union"><type>int</type><type>float</type></type><methodname>hexdec</methodname>
12
12
<methodparam><type>string</type><parameter>hex_string</parameter></methodparam>
13
13
</methodsynopsis>
14
14
<para>
...
...
@@ -20,6 +20,7 @@
20
20
<para>
21
21
<function>hexdec</function> will ignore any non-hexadecimal
22
22
characters it encounters.
23
+
As of PHP 7.4.0 supplying any invalid characters is deprecated.
23
24
</para>
24
25
</refsect1>
25
26
<refsect1 role="parameters">
...
...
@@ -43,31 +44,30 @@
43
44
The decimal representation of <parameter>hex_string</parameter>
44
45
</para>
45
46
</refsect1>
47
+

46
48
<refsect1 role="changelog">
47
49
&reftitle.changelog;
48
-
<para>
49
-
<informaltable>
50
-
<tgroup cols="2">
51
-
<thead>
52
-
<row>
53
-
<entry>&Version;</entry>
54
-
<entry>&Description;</entry>
55
-
</row>
56
-
</thead>
57
-
<tbody>
58
-
<row>
59
-
<entry>4.1.0</entry>
60
-
<entry>
61
-
The function can now convert values that are too big for
62
-
the platforms <type>integer</type> type, it will return
63
-
the value as <type>float</type> instead in that case.
64
-
</entry>
65
-
</row>
66
-
</tbody>
67
-
</tgroup>
68
-
</informaltable>
69
-
</para>
50
+
<informaltable>
51
+
<tgroup cols="2">
52
+
<thead>
53
+
<row>
54
+
<entry>&Version;</entry>
55
+
<entry>&Description;</entry>
56
+
</row>
57
+
</thead>
58
+
<tbody>
59
+
<row>
60
+
<entry>7.4.0</entry>
61
+
<entry>
62
+
Passing invalid characters will now generate a deprecation notice.
63
+
The result will still be computed as if the invalid characters did not exist.
64
+
</entry>
65
+
</row>
66
+
</tbody>
67
+
</tgroup>
68
+
</informaltable>
70
69
</refsect1>
70
+

71
71
<refsect1 role="examples">
72
72
&reftitle.examples;
73
73
<para>
...
...
@@ -88,6 +88,16 @@ var_dump(hexdec("a0")); // print "int(160)"
88
88
</example>
89
89
</para>
90
90
</refsect1>
91
+
<refsect1 role="notes">
92
+
&reftitle.notes;
93
+
<note>
94
+
<para>
95
+
The function can convert numbers that are too large to fit into the platforms
96
+
<type>int</type> type, larger values are returned as <type>float</type> in
97
+
that case.
98
+
</para>
99
+
</note>
100
+
</refsect1>
91
101
<refsect1 role="seealso">
92
102
&reftitle.seealso;
93
103
<para>
94
104