Changeset 331 for trunk/lib/Utilities.inc.php
- Timestamp:
- May 6, 2008 7:49:25 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/Utilities.inc.php
r330 r331 27 27 * Return dump as variable. 28 28 * 29 * @param mixed $var Variable to dump. 29 * @param mixed $var Variable to dump. 30 * @param bool $serialize Remove line-endings. Useful for logging variables. 30 31 * @return string Dump of var. 31 32 */ 32 function getDump($var )33 function getDump($var, $serialize=false) 33 34 { 34 35 ob_start(); … … 36 37 $d = ob_get_contents(); 37 38 ob_end_clean(); 38 return $ d;39 return $serialize ? preg_replace('/\s+/m', '', $d) : $d; 39 40 } 40 41
Note: See TracChangeset
for help on using the changeset viewer.