-
Notifications
You must be signed in to change notification settings - Fork 7.8k
Indication for the int size in phpinfo()
#12188
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Can't you use
|
This appears to be not reliably present. For comparison I have looked up the live phpinfo() examples for PHP 8.2 from both Host Europe and Hetzner. None of them show the architecture and the only reference to 64-bit at all is found in both the “System” and “Build System” strings but neither of that is a reliable indicator if it is 32-bit or 64-bit build of PHP. Please feel free to correct me if I’m wrong here. |
Indeed, Architecture and other helpers useful for support are to be set by the build provider
Perhaps you should ask these providers to set them properly? Else, this seems very specific to Windows |
That is clearly some useful information, but I don’t think this overlaps with the issue at hand. Frankly speaking, build providers are often times some small shared hosting companies that I like to describe with a lot of adjectives and none of them include “competent”. I’m arguing entirely from the perspective of an ISV that has to deal with N customers hosting on N+1 different providers. The maximum supported integer size is something that is known to PHP at this point so there is already a reliable source of truth that does not depend on the build provider at all. |
Description
The majority of PHP installations are compiled with support for 64-bit values, but there is still a considerable amount of environments out there that only support 32-bit values for whatever reason. Defining support for 64-bit values in the system requirements of a software is the obvious choice here, but revealed an important shortcoming: The support int size isn’t documented in the
phpinfo()
.This is a problem for the average user because they cannot tell that themselves unless they run a script that compares against
\PHP_INT_SIZE
. The difference here to all other system requirements like installed PHP extensions or configuration settings is that those are visible through thephpinfo()
output.It could be helpful to include some sort of an indication of the int size, be it the raw value of
\PHP_INT_SIZE
or a more “human friendly” readout like “32-bit”.The text was updated successfully, but these errors were encountered: