Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature #24280 [VarDumper] Make
dump()
a little bit more easier to …
…use (freekmurze) This PR was submitted for the master branch but it was squashed and merged into the 3.4 branch instead (closes #24280). Discussion ---------- [VarDumper] Make `dump()` a little bit more easier to use | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes Imagine you have this code: ```php $object->method(); ``` If you want to dump the object, this is currently the way to do that: ```php dump($object); $object->method(); ``` This PR makes adding (and removing) the `dump` function easier. When using one argument is used, that argument is returned. ```php dump($object)->method(); ``` When dumping multiple things, they all get returned. So you can to this: ```php $object->someMethod(...dump($arg1, $arg2, $arg3)); ``` Commits ------- 42f0984 [VarDumper] Make `dump()` a little bit more easier to use
- Loading branch information