- var_dump: documentation ( source)
<?php
declare(strict_types=1);
function doStuff(string $key, string $value)
{
echo "{$key} => {$value}\n";
}
$array = [
'1' => '1',
'2' => '2',
'3' => '3',
];
foreach ($array as $key => $value) {
var_dump($key);
doStuff($key, $value);
}