pkboom / dump-variable
Dump with variable name
Installs: 11
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/pkboom/dump-variable
Requires
- php: ^8.0
- symfony/finder: ^5.0|^6.0
- symfony/var-dumper: ^5.0|^6.0
This package is auto-updated.
Last update: 2025-10-13 13:29:10 UTC
README
Sometimes you might want to dump a variable with a name in php in the same way js does:
let name = "foo"; console.log({ name }); // { name: 'foo'}
You can do this with dv() or dvd() in php:
$name = 'foo'; // dump with variable dv($name); // dd with variable dvd($name); // [ '$name' => 'foo' ]
Installation
composer require pkboom/dump-variable --dev