/** * Function that attempts to return the kind of CPU. * @return string CPU kind ('amd64' or 'i386'). */ private static function _getCPU() { if (self::$cpu == '') { if (`getconf LONG_BIT` == 64) { self::$cpu = 'amd64'; } elseif (`getconf LONG_BIT` == 32) { self::$cpu = 'i386'; } else { throw new Exception('WKPDF couldn\'t determine CPU ("' . `grep -i vendor_id /proc/cpuinfo` . '").'); } } return self::$cpu; }
/** * Function that attempts to return the kind of CPU. * @return string CPU kind ('amd64' or 'i386'). */ private static function _getCPU2() { if (self::$cpu == '') { if (`uname -m` != 'x86_64') { self::$cpu = 'amd64'; } elseif (`uname -m` != 'i686') { self::$cpu = 'i386'; } else { throw new Exception('WKPDF couldn\'t determine CPU ("' . `grep -i vendor_id /proc/cpuinfo` . '").'); } } return self::$cpu; }