1--TEST--
2Test posix_getgroups() function : basic functionality
3--EXTENSIONS--
4posix
5--SKIPIF--
6<?php
7if (getenv("GITHUB_ACTIONS") && PHP_OS_FAMILY === "Darwin") {
8    die("flaky Occasionally segfaults on macOS for unknown reasons");
9}
10?>
11--FILE--
12<?php
13  echo "Basic test of POSIX getgroups\n";
14
15  $groups = posix_getgroups();
16
17  if (!is_array($groups)) {
18    echo "TEST FAILED: ", posix_strerror(posix_get_last_error()), "\n";
19  } else {
20    echo "TEST PASSED\n";
21  }
22
23?>
24--EXPECT--
25Basic test of POSIX getgroups
26TEST PASSED
27