$x = new AliasArray();
$x->set('z', '@');
$x->set('alpha.beta.omega', 'a');
$x->set('alpha.*', 'b');
$x->set('alpha.*.theta', 'c');
$x->set('alpha.*', 'd');
$x->set('alpha.*.gama', 'e');
header('Content-type: text/plain');
echo 'alpha: ' . var_export($x->get('alpha'), TRUE) . "\n";
echo 'all array as flat: ' . var_export($x->getFlat(), TRUE) . "\n";
Результат:
alpha: array (
'beta' =>
array (
'omega' => 'a',
),
0 => 'b',
1 =>
array (
'theta' => 'c',
),
2 => 'd',
3 =>
array (
'gama' => 'e',
),
)
all array as flat: array (
0 => '@',
1 => 'a',
2 => 'b',
3 => 'c',
4 => 'd',
5 => 'e',
)