I tried using <?php echo php_uname("m"); ?>, it returns i586 but I am on Windows 7 64 bit which I could see in My Computers Properties. So I am expecting x86_64 in output. Does any one know how to determine OS Architecture in PHP ?
I want the same thing for Mac OS X too. Any help would be appreciated.
My best guess is that even though your OS is 64bit, your Webserver is x86 and runs in WOW64-mode (32bit). If that’s the case, it should be hard to figure out in pure PHP.
My suggestion (thanks to Leigh for linking to a similar question) is to use WMI: