Пример #1
0
 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");
 }
Пример #2
0
 /**
  * Removes an element from the start of an array.
  *
  * @return mixed The removed element.
  */
 public function shift()
 {
     return CArray::shift($this->m_splArray);
 }