Logo

POSIX Functions

posix_access posix_ctermid posix_eaccess posix_errno posix_fpathconf posix_get_last_error posix_getcwd posix_getegid posix_geteuid posix_getgid posix_getgrgid posix_getgrnam posix_getgroups posix_getlogin posix_getpgid posix_getpgrp posix_getpid posix_getppid posix_getpwnam posix_getpwuid posix_getrlimit posix_getsid posix_getuid posix_initgroups posix_isatty posix_kill posix_mkfifo posix_mknod posix_pathconf posix_setegid posix_seteuid posix_setgid posix_setpgid posix_setrlimit posix_setsid posix_setuid posix_strerror posix_sysconf posix_times posix_ttyname posix_uname

posix_getpwuid

Logo doctrine/dbal doctrine/dbal
Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Return info about a user by user id
<?php posix_getpwuid(int $user_id): array|false
<?php     private function isLinuxRoot(): bool

    {

        return PHP_OS_FAMILY !== 'Windows' && posix_getpwuid(posix_geteuid())['name'] === 'root';

    }



    private function cleanupReadOnlyFile(string $filename): void
tests/Functional/ExceptionTest.php