private static function convert_int_to_char_for_ctype($int)
    {
        if (!\is_int($int)) {
            return $int;
        }

        if ($int < -128 || $int > 255) {
            return (string) $int;
        }

        if ($int < 0) {
            $int += 256;
        }

        return \chr($int);
    }
private static function convert_int_to_char_for_ctype($int)
    {
        if (!\is_int($int)) {
            return $int;
        }

        if ($int < -128 || $int > 255) {
            return (string) $int;
        }

        if ($int < 0) {
            $int += 256;
        }

        return \chr($int);
    }
private static function convert_int_to_char_for_ctype ( $ int ) { if ( ! \ is_int ( $ int ) ) { return $ int ; } if ( $ int < - 128 || $ int > 255 ) { return ( string ) $ int ; } if ( $ int < 0 ) { $ int += 256 ; } return \ chr ( $ int ) ; }
Converts integers to their char versions according to normal ctype behaviour, if needed.

If an integer between -128 and 255 inclusive is provided,
it is interpreted as the ASCII value of a single character
(negative values have 256 added in order to allow characters in the Extended ASCII range).
Any other integer is interpreted as a string containing the decimal digits of the integer.

@param string|int $int

@return mixed
Converts integers to their char versions according to normal ctype behaviour if needed .