Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Convert the first byte of a string to a value between 0 and 255
<?php ord(string $character): int
<?php         $safe = '';



        foreach (str_split($value) as $letter) {

            if (ord($letter) > 128) {

                return $letter;

            }
<?php             switch (rand(1, 3)) {

                case 1:

                    $safe .= '&#'.ord($letter).';';

                    break;

                case 2:

                    $safe .= '&#x'.dechex(ord($letter)).';';
<?php                     $safe .= '&#'.ord($letter).';';

                    break;

                case 2:

                    $safe .= '&#x'.dechex(ord($letter)).';';

                    break;

                case 3:

                    $safe .= $letter;