<?php
arr public ArrayObject::getArrayCopy ( void )
?>
<?php
$Dwarfs = [ 1 => 'Bashful', 2 => 'Doc',
3 => 'Grumpy', 4 => 'Happy',
5 => 'Sneezy', 6 => 'Sleepy', 7 => 'Dopey'];
$dwArrayObject = new ArrayObject($Dwarfs);
$dwcopy = $dwArrayObject->getArrayCopy();
foreach($dwcopy as $dw => $dwc)
{
var_dump($dw, $dwc);
echo '<br>';
}
?>
<?php
$Dwarfs = [ 1 => 'Bashful', 2 => 'Doc',
3 => 'Grumpy', 4 => 'Happy',
5 => 'Sneezy', 6 => 'Sleepy', 7 => 'Dopey'];
$dwArrayObject = new ArrayObject($Dwarfs);
$dwArrayObject['Snow White'] = 8;
$dwcopy = $dwArrayObject->getArrayCopy();
foreach($dwcopy as $dw => $dwc)
{
var_dump($dw, $dwc);
echo '<br>';
}
?>