Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 545df8f

Browse filesBrowse files
committed
feature #23709 [VarDumper] Make dump() variadic (chalasr)
This PR was merged into the 4.0-dev branch. Discussion ---------- [VarDumper] Make dump() variadic | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | n/a | License | MIT | Doc PR | n/a Commits ------- 33b737b Make dump() variadic
2 parents a2bd56e + 33b737b commit 545df8f
Copy full SHA for 545df8f

File tree

1 file changed

+4
-2
lines changed
Filter options
  • src/Symfony/Component/VarDumper/Resources/functions

1 file changed

+4
-2
lines changed

‎src/Symfony/Component/VarDumper/Resources/functions/dump.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/VarDumper/Resources/functions/dump.php
+4-2Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,11 @@
1515
/**
1616
* @author Nicolas Grekas <p@tchwork.com>
1717
*/
18-
function dump($var)
18+
function dump($var, ...$moreVars)
1919
{
20-
foreach (func_get_args() as $var) {
20+
VarDumper::dump($var);
21+
22+
foreach ($moreVars as $var) {
2123
VarDumper::dump($var);
2224
}
2325
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.