diff --git a/src/info.rs b/src/info.rs index f7291bf..03a97ab 100644 --- a/src/info.rs +++ b/src/info.rs @@ -13,6 +13,7 @@ use std::ffi::CString; extern { pub fn php_info_print_table_start(); pub fn php_info_print_table_row(num_cols: c_int, ...) -> c_void; + pub fn php_info_print_table_header(num_cols: c_int, ...) -> c_void; pub fn php_info_print_table_end(); } @@ -30,6 +31,15 @@ pub fn print_table_row(key: &str, value: &str) { }; } +/// Print the header of the PHP info table. +pub fn print_table_header(key: &str, value: &str) { + let v1 = CString::new(key).unwrap(); + let v2 = CString::new(value).unwrap(); + unsafe { + php_info_print_table_header(2, v1.as_ptr(), v2.as_ptr()); + }; +} + /// Ends the table pub fn print_table_end() { unsafe { php_info_print_table_end() }