unicode - PHP Online

Form of PHP Sandbox

Enter Your PHP code here for testing/debugging in the Online PHP Sandbox. As in the usual PHP files, you can also add HTML, but do not forget to add the tag <?php in the places where the PHP script should be executed.



Your result can be seen below.

Result of php executing





Full code of unicode.php

  1. <?php
  2.  
  3. $s1 = '49å.png';
  4. $s2 = '|49å|';
  5.  
  6. function conv( $str )
  7. {
  8.     
  9.     // $str = preg_replace('/[^[:print:]]/', '', $str); // todo brainstorm
  10.     return strtr(utf8_decode($str),
  11.         utf8_decode(
  12.         'ŠŒŽšœžŸ¥µÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýÿ'),
  13.         'SOZsozYYuAAAAAAACEEEEIIIIDNOOOOOOUUUUYsaaaaaaaceeeeiiiionoooooouuuuyy');
  14. }
  15.         
  16. echo  conv($s1) . "\n";
  17. echo  conv($s2);
File Description
  • unicode
  • PHP Code
  • 08 Sep-2022
  • 488 Bytes
You can Share it: