- var_dump: documentation ( source)
- ord: documentation ( source)
<?php
function character_iterator ($str) {
$len=strlen($str);
for ($i=0;$i<$len;++$i) yield ord($str[$i]);
}
function code_point_iterator ($str) {
$i=0;
$cp=0;
foreach (character_iterator(iconv('utf-8','utf-32be',$str)) as $b) {
if ($i===4) {
$i=0;
yield $cp;
$cp=0;
}
$cp<<=8;
$cp|=$b;
++$i;
}
if ($i!==0) yield $cp;
}
foreach (code_point_iterator('schieße') as $cp) var_dump(\IntlChar::charName(\IntlChar::foldCase($cp)));
?>