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

0.0.4 2022-02-13 05:10 UTC

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