public function arch()
    {
        if ($this->host_os === 'WINDOWS') {
            $wmi = new \COM("winmgmts:\\\\.\\root\\cimv2");
            $cpu=  $wmi->ExecQuery("Select * from Win32_Processor");

            foreach ($cpu as $c) {
                $arch = '32-bit';
                $cpu_arch = $c->AddressWidth;

                if ($cpu_arch != 32) {
                    $os = $wmi->ExecQuery("Select * from Win32_OperatingSystem");

                    foreach ($os as $o) {
                        if ($o->Version >= 6.0) {
                            $arch = objItem.OSArchitecture;
                        }
                    }
                }
            }
        } else {
            $arch = shell_exec('arch');
        }
        return trim($arch);
    }
public function arch()
    {
        if ($this->host_os === 'WINDOWS') {
            $wmi = new \COM("winmgmts:\\\\.\\root\\cimv2");
            $cpu=  $wmi->ExecQuery("Select * from Win32_Processor");

            foreach ($cpu as $c) {
                $arch = '32-bit';
                $cpu_arch = $c->AddressWidth;

                if ($cpu_arch != 32) {
                    $os = $wmi->ExecQuery("Select * from Win32_OperatingSystem");

                    foreach ($os as $o) {
                        if ($o->Version >= 6.0) {
                            $arch = objItem.OSArchitecture;
                        }
                    }
                }
            }
        } else {
            $arch = shell_exec('arch');
        }
        return trim($arch);
    }
public function arch ( ) { if ( $ this -> host_os === 'WINDOWS' ) { $ wmi = new \ COM ( "winmgmts:\\\\.\\root\\cimv2" ) ; $ cpu = $ wmi -> ExecQuery ( "Select * from Win32_Processor" ) ; foreach ( $ cpu as $ c ) { $ arch = '32-bit' ; $ cpu_arch = $ c -> AddressWidth ; if ( $ cpu_arch != 32 ) { $ os = $ wmi -> ExecQuery ( "Select * from Win32_OperatingSystem" ) ; foreach ( $ os as $ o ) { if ( $ o -> Version >= 6.0 ) { $ arch = objItem . OSArchitecture ; } } } } } else { $ arch = shell_exec ( 'arch' ) ; } return trim ( $ arch ) ; }
Get system architecture

@return string
Get system architecture