reference/math/functions/bindec.xml
86e6094e86b84a51d00ab217ac50ce8dde33d82a
...
...
@@ -8,7 +8,7 @@
8
8
<refsect1 role="description">
9
9
&reftitle.description;
10
10
<methodsynopsis>
11
-
<type>number</type><methodname>bindec</methodname>
11
+
<type class="union"><type>int</type><type>float</type></type><methodname>bindec</methodname>
12
12
<methodparam><type>string</type><parameter>binary_string</parameter></methodparam>
13
13
</methodsynopsis>
14
14
<para>
...
...
@@ -17,7 +17,7 @@
17
17
</para>
18
18
<para>
19
19
<function>bindec</function> converts a binary number to an
20
-
<type>integer</type> or, if needed for size reasons, <type>float</type>.
20
+
<type>int</type> or, if needed for size reasons, <type>float</type>.
21
21
</para>
22
22
<para>
23
23
<function>bindec</function> interprets all
...
...
@@ -35,7 +35,9 @@
35
35
<term><parameter>binary_string</parameter></term>
36
36
<listitem>
37
37
<para>
38
-
The binary string to convert
38
+
The binary string to convert.
39
+
Any invalid characters in <parameter>binary_string</parameter> are silently ignored.
40
+
As of PHP 7.4.0 supplying any invalid characters is deprecated.
39
41
</para>
40
42
</listitem>
41
43
</varlistentry>
...
...
@@ -54,31 +56,30 @@
54
56
The decimal value of <parameter>binary_string</parameter>
55
57
</para>
56
58
</refsect1>
59
+

57
60
<refsect1 role="changelog">
58
61
&reftitle.changelog;
59
-
<para>
60
-
<informaltable>
61
-
<tgroup cols="2">
62
-
<thead>
63
-
<row>
64
-
<entry>&Version;</entry>
65
-
<entry>&Description;</entry>
66
-
</row>
67
-
</thead>
68
-
<tbody>
69
-
<row>
70
-
<entry>4.1.0</entry>
71
-
<entry>
72
-
The function can now convert numbers that are too large to
73
-
fit into the platforms <type>integer</type> type, larger values
74
-
are returned as <type>float</type> in that case.
75
-
</entry>
76
-
</row>
77
-
</tbody>
78
-
</tgroup>
79
-
</informaltable>
80
-
</para>
62
+
<informaltable>
63
+
<tgroup cols="2">
64
+
<thead>
65
+
<row>
66
+
<entry>&Version;</entry>
67
+
<entry>&Description;</entry>
68
+
</row>
69
+
</thead>
70
+
<tbody>
71
+
<row>
72
+
<entry>7.4.0</entry>
73
+
<entry>
74
+
Passing invalid characters will now generate a deprecation notice.
75
+
The result will still be computed as if the invalid characters did not exist.
76
+
</entry>
77
+
</row>
78
+
</tbody>
79
+
</tgroup>
80
+
</informaltable>
81
81
</refsect1>
82
+

82
83
<refsect1 role="examples">
83
84
&reftitle.examples;
84
85
<para>
...
...
@@ -211,6 +212,17 @@ NOTE: interpreted to be the largest unsigned integer
211
212
</example>
212
213
</para>
213
214
</refsect1>
215
+

216
+
<refsect1 role="notes">
217
+
&reftitle.notes;
218
+
<note>
219
+
<para>
220
+
The function can convert numbers that are too large to fit into the platforms
221
+
<type>int</type> type, larger values are returned as <type>float</type> in
222
+
that case.
223
+
</para>
224
+
</note>
225
+
</refsect1>
214
226
<refsect1 role="seealso">
215
227
&reftitle.seealso;
216
228
<para>
217
229