Morse decode by daira

<?=strtr(strtr(fgets(STDIN),array('.'=>1,'-'=>2)),array(221122=>',',121212=>'.',1211=>l,2112=>x,2211=>z,2122=>y,2212=>q,1221=>p,2121=>c,1222=>j,1112=>v,2111=>b,1121=>f,1111=>h,112=>u,111=>s,121=>r,212=>k,211=>d,221=>g,122=>w,222=>o,21=>n,11=>i,22=>m,12=>a,1=>e,2=>t,'/'=>''));

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page