显示下拉菜单

Test of array_sum() 本页面仅提供英文版本。

Example #1 : test success
Example #2 : test success
Example #3 : test success
Example #1
$input = [
  
=> [
    
=> 2,
    
=> 4,
    
=> 6,
    
=> 8,
  ],
]
$expected_output = $test_output
$test_output = [
  
'result' => [
    
'number' => 20,
  ],
  
'php_version' => '7.1.33 Linux x86_64',
]
Example #2
$input = [
  
=> [
    
'a' => 1.2,
    
'b' => 2.3,
    
'c' => 3.4,
  ],
]
$expected_output = $test_output
$test_output = [
  
'result' => [
    
'number' => 6.9,
  ],
  
'php_version' => '7.1.33 Linux x86_64',
]
Example #3
$input = [
  
=> [
  ],
]
$expected_output = $test_output
$test_output = [
  
'result' => [
    
'number' => 0,
  ],
  
'php_version' => '7.1.33 Linux x86_64',
]