Display the drop-down list

Test of next()

Example #1 : test success
Example #2 : test success
Example #3 : test success
Example #4 : test success
Example #5 : test success
Example #6 : test success
Example #7 : test success
Example #8 : test success
Example #9 : test success
Example #1
$input = [
  
'__array' => [
    
=> 'foot',
    
=> 'bike',
    
=> 'car',
    
=> 'plane',
  ],
  
'__count' => 2,
  
=> '$array',
]
$expected_output = $test_output
$test_output = [
  
'result' => [
    
'mixed' => 'plane',
  ],
  
'php_version' => '7.1.33 Linux x86_64',
]
Example #2
$input = [
  
'__array' => [
    
=> 'foot',
    
=> 'bike',
    
=> 'car',
    
=> 'plane',
  ],
  
'__count' => 0,
  
=> '$array',
]
$expected_output = $test_output
$test_output = [
  
'result' => [
    
'mixed' => 'bike',
  ],
  
'php_version' => '7.1.33 Linux x86_64',
]
Example #3
$input = [
  
'__array' => [
    
=> 'foot',
    
=> 'bike',
    
=> 'car',
    
=> 'plane',
  ],
  
'__count' => 9,
  
=> '$array',
]
$expected_output = $test_output
$test_output = [
  
'result' => [
    
'mixed' => false,
  ],
  
'php_version' => '7.1.33 Linux x86_64',
]
Example #4
$input = [
  
'__array' => 123,
  
'__count' => 2,
  
=> '$array',
]
$expected_output = $test_output
$test_output = [
  
'result' => [
    
'mixed' => NULL,
  ],
  
'errors' => [
    
=> [
      
'code' => 2,
      
'message' => 'next() expects parameter 1 to be array, integer given',
    ],
    
=> [
      
'code' => 2,
      
'message' => 'next() expects parameter 1 to be array, integer given',
    ],
    
=> [
      
'code' => 2,
      
'message' => 'next() expects parameter 1 to be array, integer given',
    ],
  ],
  
'php_version' => '7.1.33 Linux x86_64',
]
Example #5
$input = [
  
'__array' => NULL,
  
'__count' => 2,
  
=> '$array',
]
$expected_output = $test_output
$test_output = [
  
'result' => [
    
'mixed' => NULL,
  ],
  
'errors' => [
    
=> [
      
'code' => 2,
      
'message' => 'next() expects parameter 1 to be array, null given',
    ],
    
=> [
      
'code' => 2,
      
'message' => 'next() expects parameter 1 to be array, null given',
    ],
    
=> [
      
'code' => 2,
      
'message' => 'next() expects parameter 1 to be array, null given',
    ],
  ],
  
'php_version' => '7.1.33 Linux x86_64',
]
Example #6
$input = [
  
'__array' => [
    
=> 'foot',
    
=> 'bike',
    
=> 'car',
    
=> 'plane',
  ],
  
'__count' => 123,
  
=> '$array',
]
$expected_output = $test_output
$test_output = [
  
'errors' => [
    
=> [
      
'code' => 512,
      
'message' => 'the value is over the limit ($count > 10)',
    ],
  ],
  
'php_version' => '7.1.33 Linux x86_64',
]
Example #7
$input = [
  
'__array' => [
    
=> 'foot',
    
=> 'bike',
    
=> 'car',
    
=> 'plane',
  ],
  
'__count' => 'xyz',
  
=> '$array',
]
$expected_output = $test_output
$test_output = [
  
'errors' => [
    
=> [
      
'code' => 512,
      
'message' => 'the value is not a number ($count)',
    ],
  ],
  
'php_version' => '7.1.33 Linux x86_64',
]
Example #8
$input = [
  
'__array' => [
    
=> 'foot',
    
=> 'bike',
    
=> 'car',
    
=> 'plane',
  ],
  
'__count' => 2,
  
=> '$xyz',
]
$expected_output = $test_output
$test_output = [
  
'result' => [
    
'mixed' => NULL,
  ],
  
'errors' => [
    
=> [
      
'code' => 2,
      
'message' => 'next() expects parameter 1 to be array, null given',
    ],
    
=> [
      
'code' => 2,
      
'message' => 'next() expects parameter 1 to be array, null given',
    ],
    
=> [
      
'code' => 2,
      
'message' => 'next() expects parameter 1 to be array, null given',
    ],
  ],
  
'php_version' => '7.1.33 Linux x86_64',
]
Example #9
$input = [
  
'__array' => [
    
=> 'foot',
    
=> 'bike',
    
=> 'car',
    
=> 'plane',
  ],
  
'__count' => 99,
  
=> '$array',
]
$expected_output = $test_output
$test_output = [
  
'errors' => [
    
=> [
      
'code' => 512,
      
'message' => 'the value is over the limit ($count > 10)',
    ],
  ],
  
'php_version' => '7.1.33 Linux x86_64',
]