views:

274

answers:

3

I use PHP_OS constant and I want to know what it can return on differents OS.

I found this :

  • On Linux -> Linux
  • On FreeDSB -> FreeBSD
  • On Windows NT -> WINNT
  • On Mac Os X -> Darwin

Can anyone tell me what they get with them configurations ? On Solaris, Windows XP...

+2  A: 

Try php_uname for retrieving operating system information

David Caunt
Thanks, I didn't know this function.
Kevin Campion
A: 
Rob
For HTTP_USER_AGENT, I'm ok with you, it's cause I say "without use $_SERVER["HTTP_USER_AGENT"]"
Kevin Campion
+1  A: 

Just for the record... I'm running on Windows XP and this is what's returned:

PHP_OS: WINNT

php_uname('s'): Windows NT

w3d