Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Strip whitespace (or other characters) from the end of a string
Alias chop
<?php rtrim(string $string, string $characters = " \n\r\t\v\x00"): string
<?php             $homeDirectory = $_SERVER['HOMEDRIVE'] . $_SERVER['HOMEPATH'];



            return rtrim($homeDirectory, DIRECTORY_SEPARATOR);

        }



        if ($homeDirectory = getenv('HOME')) {
<?php         }



        if ($homeDirectory = getenv('HOME')) {

            return rtrim($homeDirectory, DIRECTORY_SEPARATOR);

        }



        return null;