From ef9b1a19989f4f3110b231a1039e8ce63453cef6 Mon Sep 17 00:00:00 2001 From: Riyyi Date: Fri, 27 Aug 2021 16:19:00 +0200 Subject: [PATCH] Helper: Add parameter in _log() to disable die() after printing --- app/helper.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/helper.php b/app/helper.php index fef57b3..f9297c2 100644 --- a/app/helper.php +++ b/app/helper.php @@ -51,14 +51,17 @@ function _randomStr(int $length, string $keyspace = * Print variable inside of a
 and exit
  *
  * @param mixed[] $output The variable (single/array) to print
+ * @param bool $die Call die(); after printing
  *
  * @return void Nothing
  */
-function _log($output): void {
+function _log($output, bool $die = true): void {
 	echo '
';
 	var_dump($output);
 	echo '
'; - die(); + if ($die) { + die(); + } } //-------------------------------------//