$n_level) { $r= ''; $type = gettype($msg); if (in_array($type, ["string", "integer", "double"])) { $r.= $msg; } else { $r.= "
DBG";
                $r.=print_r($msg,true);
                $r.='
'; } $r.='
'; if ($print) { echo $r;} return $r; } } /** * @brief returns a string , for the function with a specific style * @param $msg function name __FUNCTION__ or __CLASS__ * @param $print if true display , otherwise returns a string * @return string|void */ public static function echo_function($msg,$print=true) { if (DEBUGNOALYSS > 1) { $r = ''; $r.="[FUNC: $msg]"; $r.= ''; if ($print) { echo $r;} return $r; } } /** * @brief display the file * @param $msg name of file , usually always __FILE__ * @param $print if true display , otherwise returns a string * @return string|void */ public static function echo_file($msg,$print=true) { if (DEBUGNOALYSS > 1) { $r = ''; $r.="[FILE: $msg]"; $r.= ''; if ($print) { echo $r;} return $r; } } /** * @brief display a bar depending of the size of the screen , it helps for CSS to see the media-size * @return void */ static function display_size() { echo <<Xtra Small
Small
Medium
Large
X Large
EOF; } /** * @brief for development , show request (POST, GET) * @return void */ static function display_request() { $id = uniqid("debug"); $title = \HtmlInput::title_box(_("REQUEST"), $id, "hide"); ?> {$title}
    {$content}

{$button_close} 🕶 EOF; return $r; } /** * @brief start a timer * @return void */ public static function timer_start() { global $timer; $timer=hrtime(true); } /** * @brief stop the timer and show the elapsed time, it is used for optimising the code * @return void */ public static function timer_show() { global $timer; // $delta=$timer-microtime(true) ; echo ''; echo _("Temps écoulé : "); echo (hrtime(true)-$timer)/1e+6; echo ''; } } ?>