ord
symfony/var-dumper
Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Convert the first byte of a string to a value between 0 and 255
ord
(
string $character
):
int
$s
=
$startCchr
;
$c
=
$c
[
$i
=
0
];
do {
$s
.=
$map
[
$c
[
$i
]] ??
sprintf
(
'\x%02X'
,
\ord
(
$c
[
$i
]));
} while (isset(
$c
[++
$i
]));
return
$s
.
$endCchr
;
Dumper/CliDumper.php
$s
.=
'">'
;
}
$s
.=
$map
[
$c
[
$i
]] ??
sprintf
(
'\x%02X'
,
\ord
(
$c
[
$i
]));
} while (isset(
$c
[++
$i
]));
return
$s
.
'</span>'
;
Dumper/HtmlDumper.php