Search code examples
configurationphp

What is the name of your system with PHP_OS constant


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...


Solution

  • Try php_uname for retrieving operating system information