Source
1
1
<?php
2
2
/*
3
-
** Zabbix
4
3
** Copyright (C) 2001-2024 Zabbix SIA
5
4
**
6
-
** This program is free software; you can redistribute it and/or modify
7
-
** it under the terms of the GNU General Public License as published by
8
-
** the Free Software Foundation; either version 2 of the License, or
9
-
** (at your option) any later version.
5
+
** This program is free software: you can redistribute it and/or modify it under the terms of
6
+
** the GNU Affero General Public License as published by the Free Software Foundation, version 3.
10
7
**
11
-
** This program is distributed in the hope that it will be useful,
12
-
** but WITHOUT ANY WARRANTY; without even the implied warranty of
13
-
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
-
** GNU General Public License for more details.
8
+
** This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
9
+
** without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10
+
** See the GNU Affero General Public License for more details.
15
11
**
16
-
** You should have received a copy of the GNU General Public License
17
-
** along with this program; if not, write to the Free Software
18
-
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
12
+
** You should have received a copy of the GNU Affero General Public License along with this program.
13
+
** If not, see <https://www.gnu.org/licenses/>.
19
14
**/
20
15
21
16
22
17
function sdb($return = false) {
23
18
$backtrace = debug_backtrace();
24
19
array_shift($backtrace);
25
20
$result = 'DEBUG BACKTRACE: <br/>';
26
21
foreach ($backtrace as $n => $bt) {
27
22
$result .= ' --['.$n.']-- '.$bt['file'].' : '.$bt['line'].'<br/>';
28
23
$result .= " <b>".(isset($bt['class']) ? $bt['class'].$bt['type'].$bt['function'] : $bt['function']).'</b>';