From 8abeb4dbf2bd682e8d2bbd9e6009f9095b42961e Mon Sep 17 00:00:00 2001 From: Alex Tselegidis Date: Sat, 23 Oct 2021 13:07:00 +0200 Subject: [PATCH] Added new helper file with debugging related functions --- application/helpers/debug_helper.php | 31 ++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 application/helpers/debug_helper.php diff --git a/application/helpers/debug_helper.php b/application/helpers/debug_helper.php new file mode 100644 index 00000000..e47fa901 --- /dev/null +++ b/application/helpers/debug_helper.php @@ -0,0 +1,31 @@ + + * @copyright Copyright (c) 2013 - 2020, Alex Tselegidis + * @license http://opensource.org/licenses/GPL-3.0 - GPLv3 + * @link http://easyappointments.org + * @since v1.1.0 + * ---------------------------------------------------------------------------- */ + +if ( ! function_exists('dd')) +{ + /** + * Output the provided variables with "var_dump" and stop the execution. + * + * Example: + * + * dd($appointment, $service, $provider, $customer); + * + * @param mixed ...$vars + */ + function dd(...$vars) + { + var_dump($vars); + + exit(1); + } +}