- array_reduce: documentation ( source)
- str_split: documentation ( source)
- ord: documentation ( source)
<?php
$title = 'Rotterdam';
$id = '';
$id = array_reduce(str_split($title), function($id, $character) {
return $id . (string) ord ($character);
}, $id);
echo $id;