reference/strings/functions/ord.xml
45042fef652f1b4e904e809fcbfcf31f6c60670b
...
...
@@ -10,11 +10,11 @@
10
10
&reftitle.description;
11
11
<methodsynopsis>
12
12
<type>int</type><methodname>ord</methodname>
13
-
<methodparam><type>string</type><parameter>string</parameter></methodparam>
13
+
<methodparam><type>string</type><parameter>character</parameter></methodparam>
14
14
</methodsynopsis>
15
15
<para>
16
16
Interprets the binary value of the first byte of
17
-
<parameter>string</parameter> as an unsigned integer between 0 and 255.
17
+
<parameter>character</parameter> as an unsigned integer between 0 and 255.
18
18
</para>
19
19
<para>
20
20
If the string is in a single-byte encoding, such as ASCII, ISO-8859, or Windows 1252, this is equivalent to returning the position of a character in the character set's mapping table. However, note that this function is not aware of any string encoding, and in particular will never identify a Unicode code point in a multi-byte encoding such as UTF-8 or UTF-16.
...
...
@@ -29,7 +29,7 @@
29
29
<para>
30
30
<variablelist>
31
31
<varlistentry>
32
-
<term><parameter>string</parameter></term>
32
+
<term><parameter>character</parameter></term>
33
33
<listitem>
34
34
<para>
35
35
A character.
...
...
@@ -70,7 +70,6 @@ if (ord($str) == 10) {
70
70
<programlisting role="php">
71
71
<![CDATA[
72
72
<?php
73
-
declare(encoding='UTF-8');
74
73
$str = "🐘";
75
74
for ( $pos=0; $pos < strlen($str); $pos ++ ) {
76
75
$byte = substr($str, $pos);
...
...
@@ -96,12 +95,13 @@ Byte 3 of $str has value 152
96
95
<simplelist>
97
96
<member><function>chr</function></member>
98
97
<member>An <link xlink:href="&url.asciitable;">ASCII-table</link></member>
98
+
<member><function>mb_ord</function></member>
99
+
<member><function>IntlChar::ord</function></member>
99
100
</simplelist>
100
101
</para>
101
102
</refsect1>
102
103

103
104
</refentry>
104
-

105
105
<!-- Keep this comment at the end of the file
106
106
Local variables:
107
107
mode: sgml
108
108