Is there a place to find a list of the possible values for the PHP predefined constant PHP_OS
? I\'d like to use this value for a system requirements check, but
it seems like the php_uname("s")
for non-Unix OSes would be a good start, since it looks to me like uname("s")
and php_uname("s")
are the same on Unix systems and posix sub systems, such as Cygwin, Mingw, UWin, EMX+GCC, and MKS. Below is a list of OSes that are not Posix-compliant out of the box and that run PHP.
Keep in mind, this is not at all for Browser detection, but root path detecting, directory separators that may or may not be \
and /
, EOL, and a few other things.
/
C:\
dh0:
PHP passes through the uname, except on Windows (WINNT) and Netware (Netware). See Wikipedia for a non-exhaustive list of values not mentioned in your question:
I think a better solution to do a 'requirement check' would be to actually use things that you need to know work properly and see what happens.
For example, there are constants for directory separators, functions like realpath(), etc to deal with directories on different operating systems.
What, specifically, are you trying to do?