- var_dump: documentation ( source)
- printf: documentation ( source)
<?php
$a = [
17 => 'value #1',
'test' => 'value #2',
true => 'value #3',
'0' => 'value #4'
];
var_dump($a);
foreach($a as $k=>$v) {
printf('$a[%s] = %s'."\n", $k, $v);
}