Greetings.

One very important feature of PHP is its interoperability. This allows my
colleagues to work in both Windows, Ubuntu and OSX - developing the same
application. Details like the fact that PHP will replace forward slash with
backward slash automatically in windows is a great example of that. As a
developer it's very important for me that the code executes exactly the same
- no matter if the script is running on my development machine or in the
production server. This is true for many other scripted languages.

In javascript for example I expect an integer addition to return the same
result - no matter the platform. At this point PHP is currently problematic
since it for some reason - defines the integer size to depend on the current
platform the code is running on which make no sense at all in my eyes. What
are the reasoning behind this? I think the PHP integer size should be
changed to always be 64 bit - independent of the platform. I have stumbled
on this annoying inconsistency several times the last month.

One specific use case for me where this causes problems is that I have
integer ID columns in my database. I fully expect those to overflow above
2.1 billion at some point so then I suddenly have to be concerned if PHP is
32 or 64 bit compiled. Also, telling developers that "an integer always
supports 64 bit" will make life much easier for them when they need it for
implementing large numbers in cryptography, date arithmetics, scientific
values, API interaction, etc etc.

~Hannes

Reply via email to