posix_getgrnam
Description
The posix_getgrnam of POSIX for PHP returns information about a group by name.
Syntax
posix_getgrnam( string $name ): array|false
Parameters
name
The name of the group
Return
Returns an array of elements on success, or false on failure.
Element | Description |
---|---|
name | The name element contains the name of the group. This is a short, usually less than 16 character "handle" of the group, not the real, full name. This should be the same as the name parameter used when calling the function, and hence redundant. |
passwd | The passwd element contains the group's password in an encrypted format. Often, for example on a system employing "shadow" passwords, an asterisk is returned instead. |
members | This consists of an array of string's for all the members in the group. |
gid | Group ID of the group in numeric form. |
Examples
1 · name
<? $name = "toons"; $return = posix_getgrnam($name); print_r($return); ?>
Array ( [name] => toons [passwd] => x [members] => Array ( [0] => tom [1] => jerry ) [gid] => 42 )
Links
Related
POSIX
- 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_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