method getDump documentation in bbn\X

Returns a dump of the given variable.

function() { $args = \func_get_args(); $st = ''; foreach ($args as $a) { $r = $a; if (\is_null($a)) { $r = 'null'; } elseif ($a === false) { $r = 'false'; } elseif ($a === true) { $r = 'true'; } elseif ($a === 0) { $r = '0'; } elseif ($a === '') { $r = '""'; } elseif ($a === []) { $r = '[]'; } elseif (!$a) { $r = '0'; } elseif (!\is_string($a) && \is_callable($a)) { $r = 'Function'; } elseif (\is_object($a)) { $n = \get_class($a); if ($n === 'stdClass') { $r = Str::export($a); } else{ $r = $n.' Object'; } } elseif (\is_array($a)) { $r = Str::export($a); } elseif (\is_resource($a)) { $r = 'Resource '.get_resource_type($a); } elseif (Str::isBuid($a)) { $tmp = bin2hex($a); if (strlen($tmp) === 32) { $r = '0x'.bin2hex($a); } } $st .= $r.PHP_EOL; } return PHP_EOL.$st; }

Returns a dump of the given variable. BBN is a suite of PHP and JS libraries and VueJS components - all open-source! bbn.io, build applications, the quick way

This website uses cookies to ensure you get the best experience on our website.