Printing PHP Values
Printing PHP Values
- public static function printableValue($value) — Given a value, makes the best attempt at returning a string representation of that value suitable for printing. This method returns a //complete// representation of the value; use @{method:printShort} or @{method:printShallow} to summarize values.
- public static function printShort($value) — Print a concise, human readable representation of a value.
- public static function printShallow($value, $max_depth, $max_members) — Dump some debug output about an object's members without the potential recursive explosion of verbosity that comes with `print_r()`.
Internals
Internals
- private static function printShallowRecursive($value, $max_depth, $max_members, $depth, $indent) — Implementation for @{method:printShallow}.
- private static function addIndentation($value, $indent, $first_line) — Adds indentation to the beginning of every line starting from `$first_line`.