hjaffer2001 hjaffer2001 - 7 months ago 29
PHP Question

Find Windows 32 or 64 bit using PHP

Is it possible to get the window processor bit??
I want to find the window processor bit using php??
I have coding to find the operating system and other properties.
Kindly advice.
Thanks -
Haan

Answer
<?php
switch(PHP_INT_SIZE) {
    case 4:
        echo '32-bit version of PHP';
        break;
    case 8:
        echo '64-bit version of PHP';
        break;
    default:
        echo 'PHP_INT_SIZE is ' . PHP_INT_SIZE;
}

This code snippet will at-least tell you if a 32/64 bit version of PHP is running.