title: Sum Fibonacci Numbers
signature: function sumFibonacciNumbers($n) {
test_code: <?php
  
  
  // SOLUTION CODE 
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE 
  // ============================================
  function validateSolution($actual, $expected){
      return serialize($actual) == serialize($expected);
  }
  
  function driver($n, $expected){
      try{
        if (validateSolution(PLACEHOLDER_FN_NAME($n), $expected)){
          return "PASSED";
        }
        return "FAILED";
      }
      catch (Exception $exception_obj) {
        return get_class($exception_obj);
      }
  }
  
  function main(){
      printf("TEST-0...%s\n",driver(
        9, 
        88));
      
      printf("TEST-1...%s\n",driver(
        50, 
        32951280098));
      
      printf("TEST-2...%s\n",driver(
        7, 
        33));
      
      printf("TEST-3...%s\n",driver(
        21, 
        28656));
      
      printf("TEST-4...%s\n",driver(
        21, 
        28656));
      
      printf("TEST-5...%s\n",driver(
        11, 
        232));
      
      printf("TEST-6...%s\n",driver(
        25, 
        196417));
      
      printf("TEST-7...%s\n",driver(
        62, 
        10610209857722));
      
      printf("TEST-8...%s\n",driver(
        4, 
        7));
      
  }
  
  main();
  ?>
source_py: def sum_fibonacci_numbers(n):
      if (n <= 0):
          return 0
      fibo = ([0] * (n + 1))
      fibo[1] = 1
      sm = (fibo[0] + fibo[1])
      for i in range(2, (n + 1)):
          fibo[i] = (fibo[(i - 1)] + fibo[(i - 2)])
          sm = (sm + fibo[i])
      return sm
source_cpp: int sum_fibonacci_numbers(int n) {
    if ( n <= 0 ) return 0;
    int fibo [ n + 1 ];
    fibo [ 0 ] = 0, fibo [ 1 ] = 1;
    int sum = fibo [ 0 ] + fibo [ 1 ];
    for ( int i = 2;
    i <= n;
    i ++ ) {
      fibo [ i ] = fibo [ i - 1 ] + fibo [ i - 2 ];
      sum += fibo [ i ];
    }
    return sum;
  }