public function testShift() { $array = CArray::fromElements("a", "b", "c"); $poppedString = CArray::shift($array); $this->assertTrue(CArray::equals($array, CArray::fromElements("b", "c"))); $this->assertTrue($poppedString === "a"); }
/** * Removes an element from the start of an array. * * @return mixed The removed element. */ public function shift() { return CArray::shift($this->m_splArray); }