Skip to content

Commit

Permalink
feature #23709 [VarDumper] Make dump() variadic (chalasr)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
fabpot committed Aug 1, 2017
2 parents a2bd56e + 33b737b commit 545df8f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Symfony/Component/VarDumper/Resources/functions/dump.php
Expand Up @@ -15,9 +15,11 @@
/**
* @author Nicolas Grekas <p@tchwork.com>
*/
function dump($var)
function dump($var, ...$moreVars)
{
foreach (func_get_args() as $var) {
VarDumper::dump($var);

foreach ($moreVars as $var) {
VarDumper::dump($var);
}
}
Expand Down

0 comments on commit 545df8f

Please sign in to comment.