Created
April 20, 2026 03:57
-
-
Save jkirira/cc08559f06ac9f64c7b0ff62ea0e7b7a to your computer and use it in GitHub Desktop.
Die Dump (dd)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function ddd() | |
| { | |
| $args = func_get_args(); | |
| $defaultStringLength = -1; | |
| $defaultItemNumber = -1; | |
| $defaultDepth = -1; | |
| foreach ($args as $variable) { | |
| $dumper = 'cli' === PHP_SAPI ? new CliDumper() : new HtmlDumper(); | |
| $cloner = new VarCloner(); | |
| $cloner->setMaxString($defaultStringLength); | |
| $cloner->setMaxItems($defaultItemNumber); | |
| $dumper->dump($cloner->cloneVar($variable)->withMaxDepth($defaultDepth)); | |
| } | |
| die(1); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment