[PHP] ArrayObject 用法 – 把物件當陣列用
[php]
<?
/*
* 使用 ArrayObject(array(), ArrayObject::STD_PROP_LIST);
* 把物件當陣列使用
*/
$a = new ArrayObject(array(), ArrayObject::STD_PROP_LIST);
$a->first = "001";
$a->second->one = "002";
$a->second->two = "003";
echo $a->first;
?>
[/php]