Dump variable and check content

Contents

Output

Something like this

array(3) {
  [1]=>
  string(7) "January"
  [2]=>
  string(8) "February"
  [3]=>
  string(5) "March"
}

Code examples


JavaScript

let array = {1: 'January', 2:'February', 3:'March'};
console.log(array);

Perl

use Data::Dumper;
my $array = {1 => 'January', 2 => 'February', 3 => 'March'};
print Dumper($array);

PHP

$array = [1 => 'January', 2 => 'February', 3 => 'March'];
print var_dump($array);

Python

from pprint import pprint
array = {1: 'January', 2:'February', 3:'March'}
pprint(array)

Ruby

array = {1 => 'January', 2 => 'February', 3 => 'March'}
print array.inspect