Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Return the real user ID of the current process
<?php posix_getuid(): int
<?php                 && !Platform::getEnv('COMPOSER_ALLOW_SUPERUSER')

                && (ini_get('open_basedir') || !file_exists('/.dockerenv'))

            ) {

                if (function_exists('posix_getuid') && posix_getuid() === 0) {

                    if ($commandName !== 'self-update' && $commandName !== 'selfupdate') {

                        $io->writeError('<warning>Do not run Composer as root/super user! See https://getcomposer.org/root for details</warning>');
<?php         }



        if (\function_exists('posix_getuid') && \function_exists('posix_getpwuid')) {

            $info = posix_getpwuid(posix_getuid());



            return $info['dir'];

        }