3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $dni = '342501198701065'; $row = str_split(strrev($dni)); $letters = array_combine(range(0,25), range('a', 'z')); //now just use: foreach($row as $n){ $dni_a[] = $letters[$n]; } $dni2 = implode($dni_a); echo $dni2;
based on U92Vr
Output for 5.6.0 - 7.3.0rc4
fgabahijbbafced