If the element is array, ArrayObject is returned, else StringObject is returned.
public first ( ) : |
||
Результат | The first element in the array. |
/** * @dataProvider arraySet1 */ public function testFirst($array) { $a = new ArrayObject($array); $last = $a->first(); $firstValue = reset($array); $this->assertSame($firstValue, $last->val()); }