GithubHelp home page GithubHelp logo

Comments (3)

Thinkscape avatar Thinkscape commented on July 19, 2024

@kaiohken1982 Do you know how to accurately detect 64 bit system ?

from zftool.

kaiohken1982 avatar kaiohken1982 commented on July 19, 2024

Hello Artur,
my local configuration is Xampp installed on a 64bit windows machine.
The _SERVER['SERVER_SOFTWARE'] returns this value:

Apache/2.2.21 (Win32) mod_ssl/2.2.21 OpenSSL/1.0.0e PHP/5.3.8 mod_perl/2.0.4 Perl/v5.10.1

so I think that I have a 32bit Apache installation that makes all architecture-aware php function act as they are
on a 32bit OS. I did most of the tests of this discussion

http://stackoverflow.com/questions/2353473/can-php-tell-if-the-server-os-it-64-bit

Even the intval fail.
Only the \COM test will succeed https://gist.github.com/kaiohken1982/6087916

However if this test is needed because the application will expect intval and other architecture-aware variables and function act as they are on a 64Bit environment, the current test on PHP_INT_SIZE should be ok.

What do you think?

from zftool.

Thinkscape avatar Thinkscape commented on July 19, 2024

Ok, so the confusion here is related to the fact that there are 2 checks being mentioned here:

  • Check if PHP version supports 64bit integers.
  • Check if the underlying OS is 64bit capable.

These should be separated. Check\Is64bit can stay as it is, as it's an accurate way of determining if PHP supports 64bit integers. We'll add new Check\Is64bitSystem class that will try to determine if the OS is actually 64bit. The gist you've sent me looks fine, but we'll have to branch it so it works on more systems. I'll take a look at it soonish.

from zftool.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.