コード例 #1
0
ファイル: CArrayTest.php プロジェクト: nunodotferreira/Phred
 public function testElementsProduct()
 {
     $array = CArray::fromElements(1, 2, 3, 4, 5, 6, 7, 8, 9, 10);
     $this->assertTrue(CArray::elementsProduct($array) == 3628800);
 }
コード例 #2
0
 /**
  * Multiplies all the elements in an array and returns the result.
  *
  * @return number The product of all the elements in the array.
  */
 public function elementsProduct()
 {
     return CArray::elementsProduct($this->m_splArray);
 }