(PHP 5 >= 5.0.0)
ArrayObject::offsetGet — Returns the value at the specified index
The index with the value.
The value at the specified index or FALSE.
Example #1 ArrayObject::offsetget() example
<?php
$arrayobj = new ArrayObject(array('zero', 7, 'example'=>'e.g.'));
var_dump($arrayobj->offsetget(1));
var_dump($arrayobj->offsetget('example'));
var_dump($arrayobj->offsetexists('notfound'));
?>
以上例程会输出:
int(7) string(4) "e.g." bool(false)