Skip to content

Commit a3663b4

Browse files
remicolletnikic
authored andcommitted
display extension and AST version in phpinfo
1 parent 80cdfb6 commit a3663b4

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

ast.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1167,9 +1167,15 @@ const zend_function_entry ast_node_functions[] = {
11671167
};
11681168

11691169
PHP_MINFO_FUNCTION(ast) {
1170+
zend_string *info = ast_version_info();
1171+
11701172
php_info_print_table_start();
11711173
php_info_print_table_row(2, "ast support", "enabled");
1174+
php_info_print_table_row(2, "extension version", PHP_AST_VERSION);
1175+
php_info_print_table_row(2, "AST version", ZSTR_VAL(info));
11721176
php_info_print_table_end();
1177+
1178+
zend_string_release(info);
11731179
}
11741180

11751181
PHP_RINIT_FUNCTION(ast) {

0 commit comments

Comments
 (0)