I opted to use `posix_geteuid` primarily for cross-platform support.

I see that wp-cli has a `bin/wp.bat`, which suggests that wp-cli hopes to be cross-platform. Executing `/usr/bin/id` directly is not cross-platform, and may leak warnings/errors through `STDERR`, in addition to having possibly undefined behavior. (I say "may" since I don't use Windows enough to speak to this definitively.)

I am unfortunately fully aware that PHP's POSIX extension is hit and miss. While they're enabled by default for PHP builds in POSIX-like environments, they are sometimes disabled by distributions.