- var_dump: documentation ( source)
<?php
function testWrapper()
{
foreach (array(
'testvar1',
'testvar2'
) AS $varname)
{
if (!isset($$varname))
{
echo "\nSetting $varname\n";
$$varname = array();
}
var_dump($$varname);
}
}
testWrapper();