You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feature #48432 [VarDumper] Add support of named arguments to dd() and dump() to display a label (alexandre-daubois)
This PR was merged into the 6.3 branch.
Discussion
----------
[VarDumper] Add support of named arguments to `dd()` and `dump()` to display a label
| Q | A
| ------------- | ---
| Branch? | 6.3
| Bug fix? | no
| New feature? | yes
| Deprecations? | no
| Tickets | _N/A_
| License | MIT
| Doc PR | _Todo_
Following an idea from `@nicolas`-grekas, the goal here is to ease debugging with `dd()` and `dump()` by supporting named arguments passed to them. This will display a label, helping understand the goal/meaning of a dump.
**Example in web browser:**

**Example in CLI:**

The above example is clickable and points to `file:///home/alexandredaubois/PhpstormProjects/dummy_project/src/Command/TestCommand.php#L15`.
No more `dd("First one", $var1, "Second var", $var2);`!
Commits
-------
2519c5c [VarDumper] Add support of named arguments to `dd()` and `dump()` to display the argument name
0 commit comments