symfony/symfony — pull request #12202 by nicolas-grekas (2014-10-10 15:51:56+00:00)
Title: [VarDumper] enhance dumping refs

| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | nicolas-grekas/Patchwork-Dumper#39
| License | MIT
| Doc PR | -

This makes dumps prettier:
- VarCloner now exposes the "isref" state of a PHP variable
- on hard refs, `#n` suffix is replaced by `&n` prefix
- remaining `#n` (soft refs) are moved inside the `{ }`
- `@n` are replaced by `#n ▶` for objects and arrays

The result is that there is one less ref marker (~~`@n`~~) to understand,
and that all *same* objects / hard refs are *visually* identical.

Some bug fixes related to indentation and JavaScript navigation/hovers are included for free.

For the same (complex) variable:

Before:
![before](https://cloud.githubusercontent.com/assets/243674/4595026/f6b2a98c-5094-11e4-9fe0-dc6d24da3f14.png)

After:
![after](https://cloud.githubusercontent.com/assets/243674/4595035/07e04980-5095-11e4-9e45-54a1e7453547.png)