From 291dece85453ef6ae633ae05244eb0249978d136 Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Tue, 3 Sep 2019 12:40:16 +0200 Subject: [PATCH] obhd encapsulated debug print --- pandora_console/include/functions_html.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/pandora_console/include/functions_html.php b/pandora_console/include/functions_html.php index b5955630b8..8e88f66c02 100644 --- a/pandora_console/include/functions_html.php +++ b/pandora_console/include/functions_html.php @@ -98,6 +98,23 @@ function hd($var, $file='', $oneline=false) } +/** + * Encapsulation (ob) for debug print function. + * + * @param mixed $var Variable to be dumped. + * @param string $file Target file path. + * @param boolean $oneline Show in oneline. + * + * @return string Dump string. + */ +function obhd($var, $file='', $oneline=false) +{ + ob_start(); + hd($var, $file, $oneline); + return ob_get_clean(); +} + + function debug() { $args_num = func_num_args();