pkboom/dump-variable

Dump with variable name

0.0.4 2022-02-13 05:10 UTC

This package is auto-updated.

Last update: 2022-11-13 06:50:00 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