1--TEST-- 2Test posix_getgrnam() function : basic functionality 3--EXTENSIONS-- 4posix 5--SKIPIF-- 6<?php 7if (!posix_getgroups()) die('skip - groups unavailable (ci)'); 8if (getenv("GITHUB_ACTIONS") && PHP_OS_FAMILY === "Darwin") { 9 die("flaky Occasionally segfaults on macOS for unknown reasons"); 10} 11?> 12--FILE-- 13<?php 14 $groupid = posix_getgroups()[0]; 15 $group = posix_getgrgid($groupid); 16 $groupinfo = posix_getgrnam($group["name"]); 17 var_dump($groupinfo); 18 $groupinfo = posix_getgrnam(""); 19 var_dump($groupinfo); 20?> 21--EXPECTF-- 22array(4) { 23 ["name"]=> 24 string(%d) "%s" 25 ["passwd"]=> 26 string(%d) "%S" 27 ["members"]=> 28%a 29 ["gid"]=> 30 int(%d) 31} 32bool(false) 33