Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 335
Kevin Campion Avatar asked May 16 '09 17:05

Kevin Campion


2 Answers

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

PHP_OS : WINNT

php_uname('s') : Windows NT

UPDATE: The same on Windows 7.

like image 77
MrWhite Avatar answered Oct 17 '22 13:10

MrWhite


Try php_uname for retrieving operating system information

like image 3
David Snabel-Caunt Avatar answered Oct 17 '22 13:10

David Snabel-Caunt