Skip to content
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

Show the integer size in phpinfo() #12201

Merged
merged 1 commit into from Sep 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions NEWS
Expand Up @@ -8,4 +8,7 @@ Core:
DOM:
. Added DOMNode::compareDocumentPosition(). (nielsdos)

Standard:
. Implement GH-12188 (Indication for the int size in phpinfo()). (timwolla)

<<< NOTE: Insert NEWS from last stable release here prior to actual release! >>>
3 changes: 3 additions & 0 deletions ext/standard/info.c
Expand Up @@ -865,6 +865,9 @@ PHPAPI ZEND_COLD void php_print_info(int flag)
php_info_print_table_row(2, "Zend Extension Build", ZEND_EXTENSION_BUILD_ID);
php_info_print_table_row(2, "PHP Extension Build", ZEND_MODULE_BUILD_ID);

snprintf(temp_api, sizeof(temp_api), "%d bits", SIZEOF_ZEND_LONG * 8);
php_info_print_table_row(2, "PHP Integer Size", temp_api);

#if ZEND_DEBUG
php_info_print_table_row(2, "Debug Build", "yes" );
#else
Expand Down
1 change: 1 addition & 0 deletions ext/standard/tests/general_functions/phpinfo.phpt
Expand Up @@ -29,6 +29,7 @@ PHP Extension => %d
Zend Extension => %d
Zend Extension Build => API%s
PHP Extension Build => API%s
PHP Integer Size => %d bits
Debug Build => %s
Thread Safety => %s%A
Zend Signal Handling => %s
Expand Down