Skip to content

Commit b2d244a

Browse files
authored
Show the integer size in phpinfo() (#12201)
Resolves GH-12188
1 parent 9f6cb6b commit b2d244a

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,7 @@ Core:
88
DOM:
99
. Added DOMNode::compareDocumentPosition(). (nielsdos)
1010

11+
Standard:
12+
. Implement GH-12188 (Indication for the int size in phpinfo()). (timwolla)
13+
1114
<<< NOTE: Insert NEWS from last stable release here prior to actual release! >>>

ext/standard/info.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -865,6 +865,9 @@ PHPAPI ZEND_COLD void php_print_info(int flag)
865865
php_info_print_table_row(2, "Zend Extension Build", ZEND_EXTENSION_BUILD_ID);
866866
php_info_print_table_row(2, "PHP Extension Build", ZEND_MODULE_BUILD_ID);
867867

868+
snprintf(temp_api, sizeof(temp_api), "%d bits", SIZEOF_ZEND_LONG * 8);
869+
php_info_print_table_row(2, "PHP Integer Size", temp_api);
870+
868871
#if ZEND_DEBUG
869872
php_info_print_table_row(2, "Debug Build", "yes" );
870873
#else

ext/standard/tests/general_functions/phpinfo.phpt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ PHP Extension => %d
2929
Zend Extension => %d
3030
Zend Extension Build => API%s
3131
PHP Extension Build => API%s
32+
PHP Integer Size => %d bits
3233
Debug Build => %s
3334
Thread Safety => %s%A
3435
Zend Signal Handling => %s

0 commit comments

Comments
 (0)