projects
/
ldapsaisie.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9ddb6c1
)
functions : Added varDump function and use it in LSdebug function
author
Benjamin Renard
<brenard@easter-eggs.com>
Wed, 11 Nov 2009 19:53:49 +0000
(19:53 +0000)
committer
Benjamin Renard
<brenard@easter-eggs.com>
Wed, 11 Nov 2009 19:53:49 +0000
(19:53 +0000)
trunk/includes/functions.php
patch
|
blob
|
history
diff --git
a/trunk/includes/functions.php
b/trunk/includes/functions.php
index
59e00e1
..
035cb35
100644
(file)
--- a/
trunk/includes/functions.php
+++ b/
trunk/includes/functions.php
@@
-208,13
+208,18
@@
function return_data($data) {
return $data;
}
+function varDump($data) {
+ ob_start();
+ var_dump($data);
+ $data=ob_get_contents();
+ ob_end_clean();
+ return $data;
+}
+
$GLOBALS['LSdebug_fields']=array();
function LSdebug($data,$dump=false) {
if ($dump) {
- ob_start();
- var_dump($data);
- $GLOBALS['LSdebug_fields'][]=ob_get_contents();
- ob_end_clean();
+ $GLOBALS['LSdebug_fields'][]=varDump($data);
}
else {
if (is_array($data)||is_object($data)) {